Показать сообщение отдельно

Нужна помошь. Си.
  #1  
Старый 24.03.2009, 17:48
Juda
Познающий
Регистрация: 02.08.2008
Сообщений: 55
С нами: 9354619

Репутация: 30
Question Нужна помошь. Си.

Давно уже не писал не чего на Си и вот ошибка с которой не могу справиться:

Error 1 error LNK2001: unresolved external symbol _NetShareAdd@16 AutoShare.obj AutoShare


исходник:



#define UNICODE
#include "stdafx.h"
#include "AutoShare.h"
#include <windef.h>
#include <lmcons.h>

#include <windows.h>
#include <stdio.h>
#include <lm.h>





#define MAX_LOADSTRING 100

#define ACCESS_READ 1
#define ACCESS_WRITE 2
#define ACCESS_EXEC 0x08
#define NERR_Success 0


// Global Variables:
HINSTANCE hInst; // current instance
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name



NET_API_STATUS res=0;
SHARE_INFO_2 inf;


int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
NET_API_STATUS res;
SHARE_INFO_2 p;
DWORD parm_err = 0;

LPWSTR domain = (LPWSTR)"DOMEN";
p.shi2_netname = (LPWSTR)TEXT("TESTSHARE");
p.shi2_type = STYPE_DISKTREE; // disk drive
p.shi2_remark = (LPWSTR)TEXT("TESTSHARE to test NetShareAdd");
p.shi2_permissions = 0;
p.shi2_max_uses = 4;
p.shi2_current_uses = 0;
p.shi2_path = (LPWSTR)TEXT("D:\\audio");
p.shi2_passwd = NULL; // no password

NetShareAdd(domain, 2, (LPBYTE) &p, &parm_err);

return 1;
}

Последний раз редактировалось Juda; 24.03.2009 в 18:27..
 
Ответить с цитированием