I wish to know how can I handle Windows Networking (WNet). I have some questions:
1) Does somebody have an example to use the following functions in powerbasic,
and if possible please explain the meaning of the parameters:
DWORD WNetOpenEnum(
DWORD dwScope, // scope of enumeration
DWORD dwType, // resource types to list
DWORD dwUsage, // resource usage to list
LPNETRESOURCE lpNetResource,
// pointer to resource structure
LPHANDLE lphEnum // pointer to enumeration handle buffer
);
DWORD WNetEnumResource(
HANDLE hEnum, // handle to enumeration
LPDWORD lpcCount, // pointer to entries to list
LPVOID lpBuffer, // pointer to buffer for results
LPDWORD lpBufferSize // pointer to buffer size variable
);
2) I would like to use this
u& = WNetOpenEnum(%RESOURCE_CONTEXT,%RESOURCETYPE_DISK,%RESOURCEUSAGE_CONNECTABLE,NULL,x%)
but PBDLL says "as.. or required NULL"
3) What is the correct way to use u& in this command?
x& = WNetEnumResource(u&,0xFFFFFFFF, ...
4) How can I define the resource structure in PBDLL?
Best regards
------------------
1) Does somebody have an example to use the following functions in powerbasic,
and if possible please explain the meaning of the parameters:
DWORD WNetOpenEnum(
DWORD dwScope, // scope of enumeration
DWORD dwType, // resource types to list
DWORD dwUsage, // resource usage to list
LPNETRESOURCE lpNetResource,
// pointer to resource structure
LPHANDLE lphEnum // pointer to enumeration handle buffer
);
DWORD WNetEnumResource(
HANDLE hEnum, // handle to enumeration
LPDWORD lpcCount, // pointer to entries to list
LPVOID lpBuffer, // pointer to buffer for results
LPDWORD lpBufferSize // pointer to buffer size variable
);
2) I would like to use this
u& = WNetOpenEnum(%RESOURCE_CONTEXT,%RESOURCETYPE_DISK,%RESOURCEUSAGE_CONNECTABLE,NULL,x%)
but PBDLL says "as.. or required NULL"
3) What is the correct way to use u& in this command?
x& = WNetEnumResource(u&,0xFFFFFFFF, ...
4) How can I define the resource structure in PBDLL?
Best regards
------------------
Comment