Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Int WINAPI PcdGetChannelSetup(LPCTSTR lpszChannel, LPOPENDAT
Message
From
09/02/2003 08:40:48
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Int WINAPI PcdGetChannelSetup(LPCTSTR lpszChannel, LPOPENDAT
Miscellaneous
Thread ID:
00751156
Message ID:
00751156
Views:
76
Hi!

Still using VP6 SP4.
Could anybody tell me how to call this function in VFP?
int WINAPI PcdGetChannelSetup(LPCTSTR lpszChannel, LPOPENDATA lpOpenData)

I have done the following:
PCDOPENDATA =REPLICATE(CHR(0),512)
PCDCANAL="SOCKET"+REPLICATE(CHR(0),1)

DECLARE INTEGER PcdGetChannelSetup IN SCommDll.DLL STRING , STRING @

Result = PcdGetChannelSetup(PCDCANAL,@PCDOPENDATA);
The returned value is WRONG PARAMETER?

The call is to a section in the registry but Im not sure.
The struct is like this:
And from my view this is 512 byte long??
typedef struct {
SHORT Port;
SHORT Device;
BOOL bPguMode;
DWORD SbusMode;
DWORD Protocol;
DWORD BaudRate;
DWORD TsDelay;
DWORD TnDelay;
DWORD Timeout;
DWORD BreakLen;
DWORD UartFifoLen;
BOOL bDontClose;
BOOL bPortOpen;
BOOL bConnected;
DWORD dwType;
CHAR Channel[PCD_CHANNELSIZE];
CHAR Section[PCD_SECTIONSIZE];
DWORD ModeToTry;
DWORD Cpu;
DWORD Station;
BOOL bAutoStn;
DWORD Retry;
CHAR DeviceName[PCD_DEVICESIZE];
BOOL bUseModem;
BOOL bAutoAnswer;
CHAR PhoneNumber[PCD_PHONESIZE];
DWORD CountryCode;
DWORD AreaCode;
CHAR Location[PCD_LOCSIZE];
BOOL bUseDialing;
DWORD DialRetry;
DWORD TcpPort;
HWND hPWDlgParentWnd;
BYTE Reserved[84];
} PCDOPENDATA;

I hope someone could help me on this.

Best regards
Per Simmersholm
Next
Reply
Map
View

Click here to load this message in the networking platform