Tous d'abor bonjour, quand je compile mon programme (visual c++ 6.0), il m'affiche cette erreur, ece que quelqu'un pourrais l'aider ? :
Main.obj : error LNK2001: unresolved external symbol "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z)
Release/Logiciel.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
voicis le contexte :
#include <windows.h>
#include <sys/timeb.h>
#include <math.h>
#include <assert.h>
#include <iostream.h>
#include <stdio.h>
#pragma comment(lib, "Release/DLL.lib")
#include "DLL.h"
#include "resource.h"
//*********************Les classes***********************
CEncrypte pcEncrypte;
HINSTANCE hInst = NULL;
HWND hwnd = NULL;
WNDCLASS fenetre;
//*******************************************************
//************Prototype de fonction*****************************************
LRESULT CALLBACK WindowProc(HWND hwnd,UINT msg,WPARAM wparam,LPARAM lparam);
LRESULT CALLBACK DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
//**************************************************************************
LRESULT CALLBACK DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
case WM_INITDIALOG:
//Reinitialisation (optionel)
memset(pcEncrypte.cEncrypte, 0, sizeof(pcEncrypte.cEncrypte));
break;
case WM_COMMAND:
{
/*
case VK_ESCAPE:
exit(1);
break;*/
switch(LOWORD(wParam))
{
case ID_EXIT:
//ShellExecute(hwnd,"open","www.DCA-Software.fr.st",0,0,SW_NORMAL);
exit(1);
break;
case ID_ENCRYPTE:
GetDlgItemText( hwnd, IDC_CONVERSION_W, pcEncrypte.cEncrypte, 2000); //On repeche les données
pcEncrypte.EncrypteTxt(); //On vas chercher le texte de la variable
break;
case IDC_OPTION:
//code for option here
break;
}
break;
}
default:
return FALSE;
}
return TRUE;
}
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int nCmdShow)
{
//définition des paramètre de la classe fenêtre
fenetre.style = CS_DBLCLKS | CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
fenetre.lpfnWndProc = WindowProc;
fenetre.cbClsExtra = 0;
fenetre.cbWndExtra = 0;
fenetre.hInstance = hInstance;
fenetre.hIcon = LoadIcon(hInst, NULL);//MAKEINTRESOURCE(IDI_APPICON)
fenetre.hCursor = LoadCursor(NULL, IDC_ARROW);
fenetre.hbrBackground = (struct HBRUSH__ *)GetStockObject(WHITE_BRUSH);
fenetre.lpszMenuName = NULL;
fenetre.lpszClassName = "Classe fenetre";
// enregistrer la classe fenêtre
if (!RegisterClass(&fenetre)) return(0);
hInst = hInstance;
DialogBox(hInst, MAKEINTRESOURCE(IDD_MAIN_FRAME), NULL, ( DLGPROC ) DlgProc); //Ouverture de la boite de dialogue
return (0);
}
J'ai une dll qui de trouve dans\Release ,et la librairi y est aussi.
J'espere que quelqu'un pourrai m'aider...
Mr.X (et la vie continue...)