Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need a simple FLL
Message
From
20/09/2006 01:04:36
 
 
To
19/09/2006 18:35:27
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01154766
Message ID:
01155354
Views:
21
>>
>>double space, double fast:
>>
>>For lnPos = 1 To m.lnLen*2 STEP 2
>>	=Sys(2600, m.lnMemBlock2 + m.lnPos*1.5 , 2, Sys(2600, m.lnMemBlock1 + m.lnPos , 2))
>>Endfor
>>
>
>Nice! Just one thing:
>
>
>For lnPos = 0 To m.lnLen * 2 STEP 2
>	=Sys(2600, m.lnMemBlock2 + m.lnPos * 1.5 , 2, Sys(2600, m.lnMemBlock1 + m.lnPos , 2))
>Endfor
>
>
>Otherwise you miss the first byte.

A my typo
#Define HEAP_ZERO_MEMORY		0x8

m.lcString = Filetostr(Getfile())
m.lnLen = Len(m.lcString)

Declare Integer GetProcessHeap In win32api

Declare Integer HeapAlloc In win32api ;
	Integer hHeap, ;
	Integer dwFlags, ;
	Integer dwBytes

Declare Integer HeapFree In win32api ;
	Integer hHeap, ;
	Integer dwFlags, ;
	Integer lpMem

lnHeap  = GetProcessHeap()

lnSeconds = Seconds()

lnMemBlock2 = HeapAlloc(m.lnHeap, 0x8, m.lnLen * 3)

Sys(2600, m.lnMemBlock2, m.lnLen * 3, REPLICATE([%], m.lnLen * 3))

lnMemBlock1 = HeapAlloc(m.lnHeap, 0x8, m.lnLen*2)

Sys(2600, m.lnMemBlock1, m.lnLen*2, STRCONV(m.lcString,15))

mem1_1 = m.lnMemBlock1 - 1
For lnPos = 1 To m.lnLen*2 STEP 2
	=Sys(2600, m.lnMemBlock2 + m.lnPos*1.5 , 2, Sys(2600, m.mem1_1 + m.lnPos , 2))
Endfor

HeapFree(m.lnHeap, 0, m.lnMemBlock1)

lcEscHex = Sys(2600, m.lnMemBlock2,  m.lnLen * 3)


HeapFree(m.lnHeap, 0, m.lnMemBlock2)

?[Time: ], Seconds() - m.lnSeconds, [Bytes: ], m.lnLen
?[Escaped Hex:        ], Left(m.lcEscHex, 30)
?[StrConv Equivalent: ], Left(Strconv(m.lcString, 15), 20)

Strtofile(m.lcEscHex, Putfile())
Previous
Reply
Map
View

Click here to load this message in the networking platform