كتبت هذا الكود وقد قام المترجم بترجمته بدون اخطاء لكن ا ل linker يرجع الخطا التالي
اقتباسConfiguration: launchdial4 - Win32 Debug--------------------Linking...
launchdial4.obj : error LNK2001: unresolved external symbol __imp__InternetAutodial@8
Debug/launchdial4.exe : fatal error LNK1120: 1 unresolved externals
-------------------error executing link.exe
فما هو السبب يا ترى ارجو المساعدة........
الكود هو:
[// launchdial4.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "windows.h"
#include "wininet.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
BOOL b = InternetAutodial(INTERNET_AUTODIAL_FORCE_UNATTENDED, NULL);
// not really necessary, but good to know.
OutputDebugString(b ? "TRUE\n" : "FALSE\n");
// If a command line was passed to the application, then try and
// run the application using CreateProcess
if (*lpCmdLine)
{
BOOL success = FALSE;
STARTUPINFO si = {0};
PROCESS_INFORMATION pi = {0};
// As far as I can tell, the STARTUPINFO structure really only needs
// the cb member filled. Please correct me if I'm wrong here.
si.cb = sizeof(si);
success = CreateProcess(NULL,
lpCmdLine,
NULL,
NULL,
FALSE,
NORMAL_PRIORITY_CLASS,
NULL,
NULL,
&si,
π);
if (FALSE == success)
{
MessageBox(NULL, "Couldn't start application", "Error", MB_OK);
}
}
return 0;
}