Y
yanlei
Unregistered / Unconfirmed
GUEST, unregistred user!
判断局域网某台计算机的某个目录是否共享,最好有源码
如://yy/ss
#define UNICODE
#include <windows.h>
#include <stdio.h>
#include <lm.h>
void wmain( int argc, TCHAR *argv[ ])
{
NET_API_STATUS res;
DWORD devType = 0;
if(argc<3)
printf("Usage: NetShareCheck server device/n");
else
{
//
// Call the NetShareCheck function.
//
res=NetShareCheck(argv[1], _wcsupr(argv[2]), &devType);
//
// If the function succeeds, inform the user.
//
if(res==0)
printf("Device is shared as type %u./n",devType);
//
// Otherwise, print the error.
//
else
printf("Error: %u/n", res);
}
return;
}
如下声明对吗?
function NetShareCheck(ServerName: PWideChar; Device: PWideChar; Typed: Pdword): LongInt;
stdcall; external 'netapi32.DLL'
如://yy/ss
#define UNICODE
#include <windows.h>
#include <stdio.h>
#include <lm.h>
void wmain( int argc, TCHAR *argv[ ])
{
NET_API_STATUS res;
DWORD devType = 0;
if(argc<3)
printf("Usage: NetShareCheck server device/n");
else
{
//
// Call the NetShareCheck function.
//
res=NetShareCheck(argv[1], _wcsupr(argv[2]), &devType);
//
// If the function succeeds, inform the user.
//
if(res==0)
printf("Device is shared as type %u./n",devType);
//
// Otherwise, print the error.
//
else
printf("Error: %u/n", res);
}
return;
}
如下声明对吗?
function NetShareCheck(ServerName: PWideChar; Device: PWideChar; Typed: Pdword): LongInt;
stdcall; external 'netapi32.DLL'