Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling Win32API funcions on FPW26
Message
From
15/07/2003 13:44:37
 
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00810180
Message ID:
00810327
Views:
15
Sergey,

This is the test that I am trying to do (before those Rick's stuff)
#Define MAX_FILENAME_LEN 256
set library to "foxtools.fll" additive
cVolume  = RegFn("GetVolumeInformation", "CCI@@@CI", "I", "Win32API.DLL")
* an error crash the FPW26 at this time

*Declare integer GetVolumeInformation in Win32API;
*         string lpRootPathName,;
*         string lpVolumeNameBuffer,;
*        integer nVolumeNameSize,;
*        integer @lpVolumeSerialNumber,;
*        integer @lpMaximumComponentLength,;
*        integer @lpFileSystemFlags,;
*         string lpFileSystemNameBuffer ,;
*        integer nFileSystemNameSize
Store 0 to ser,i,j
Store space(128) to s,s2
*x               = GetVolumeInformation("C:\",s,MAX_FILENAME_LEN,@ser,@i,@j,s2,MAX_FILENAME_LEN)
*ser             = alltrim(str(ser, 15, 0))

=CallFn(cVolume, "C:\",s,MAX_FILENAME_LEN,@ser,@i,@j,s2,MAX_FILENAME_LEN)

release library "foxtools.fll"

? iif(llError, message(), allt(ser))
Here is the code (with Rick's stuffs)
************************************************************************
*PROCEDURE Call32Demo
********************
***  Modified: 12/04/95
***  Function: Example program for the Call32 functions
***    Assume: Call32.dll is available in local path or
***            Windows\system directory
*************************************************************************

*** Front end routines for Call32 Interface
set defa to f:\temp3\tests\

SET PROCEDURE TO CALL32

SET LIBRARY TO home()+"FOXTOOLS" ADDITIVE
CLEAR

cVolume=Reg32("GetVolumeInformation", "CCI@@@CI", "I") && it hangs here

=CallFn(cVolume, "C:\", s, MAX_FILENAME_LEN, @ser, @i, @j, s2, MAX_FILENAME_LEN)
return
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform