donde se encuentra GetProcAddress()
Posted: Thu Feb 19, 2009 2:03 am
Tengo un error de linkeo UNRESOLVED EXTERNAL GetProcAddress
la linea de codigo que genera el error es:
lpZipCreateFile = (ZipCreateFilePtr *)GetProcAddress(zipDll, ZIPCREATEFILENAME);
(A proposito se trata de probar LiteZip.dll que me sugiere JL Capel en mi post anterior)
ESTOY UTILIZANDO EL BUILD DE AUGOST 2007, poruqe hasta hoy no me ha dado ningun problema, mi g2.bat ha sido el mismo que he usado desde el principio.
Saludos.
INCLUYO PARTE DEL SOURCE:
#pragma BEGINDUMP
#include <windows.h>
#include <tchar.h>
// Include LiteZip.h for creating a ZIP archive
#include "LiteZip.h"
// Where we store the pointers to LiteZip.dll's functions that we call
ZipCreateFilePtr *lpZipCreateFile;
ZipAddFilePtr *lpZipAddFile;
ZipClosePtr *lpZipClose;
ZipFormatMessagePtr *lpZipFormatMessage;
HB_FUNC( CREAZIP )
{
LPWSTR sZipfile = AnsiToWide( hb_parc( 1 ) );
HMODULE zipDll;
HZIP hz;
DWORD result;
// Open the LiteZip.DLL. Note: If LiteZip.dll is not placed in a path that can be found
// by this app, then LoadLibrary will fail. So, either copy LiteZip.dll to the same
// directory as this EXE, or to some directory that Windows is set to search.
if ((zipDll = (HMODULE)LoadLibrary(_T("LiteZip.dll"))))
{
// Get the addresses of 4 functions in LiteZip.dll -- ZipCreateFile(), ZipAddFile()
// ZipClose(), and ZipFormatMessage.
lpZipCreateFile = (ZipCreateFilePtr *)GetProcAddress(zipDll, ZIPCREATEFILENAME);
lpZipAddFile = (ZipAddFilePtr *)GetProcAddress(zipDll, ZIPADDFILENAME);
lpZipClose = (ZipClosePtr *)GetProcAddress(zipDll, ZIPCLOSENAME);
lpZipFormatMessage = (ZipFormatMessagePtr *)GetProcAddress(zipDll, ZIPFORMATMESSAGENAME);
// Create a ZIP archive on disk named as sZipfile
if (!(result = lpZipCreateFile(&hz, sZipfile, 0)))
{
la linea de codigo que genera el error es:
lpZipCreateFile = (ZipCreateFilePtr *)GetProcAddress(zipDll, ZIPCREATEFILENAME);
(A proposito se trata de probar LiteZip.dll que me sugiere JL Capel en mi post anterior)
ESTOY UTILIZANDO EL BUILD DE AUGOST 2007, poruqe hasta hoy no me ha dado ningun problema, mi g2.bat ha sido el mismo que he usado desde el principio.
Saludos.
INCLUYO PARTE DEL SOURCE:
#pragma BEGINDUMP
#include <windows.h>
#include <tchar.h>
// Include LiteZip.h for creating a ZIP archive
#include "LiteZip.h"
// Where we store the pointers to LiteZip.dll's functions that we call
ZipCreateFilePtr *lpZipCreateFile;
ZipAddFilePtr *lpZipAddFile;
ZipClosePtr *lpZipClose;
ZipFormatMessagePtr *lpZipFormatMessage;
HB_FUNC( CREAZIP )
{
LPWSTR sZipfile = AnsiToWide( hb_parc( 1 ) );
HMODULE zipDll;
HZIP hz;
DWORD result;
// Open the LiteZip.DLL. Note: If LiteZip.dll is not placed in a path that can be found
// by this app, then LoadLibrary will fail. So, either copy LiteZip.dll to the same
// directory as this EXE, or to some directory that Windows is set to search.
if ((zipDll = (HMODULE)LoadLibrary(_T("LiteZip.dll"))))
{
// Get the addresses of 4 functions in LiteZip.dll -- ZipCreateFile(), ZipAddFile()
// ZipClose(), and ZipFormatMessage.
lpZipCreateFile = (ZipCreateFilePtr *)GetProcAddress(zipDll, ZIPCREATEFILENAME);
lpZipAddFile = (ZipAddFilePtr *)GetProcAddress(zipDll, ZIPADDFILENAME);
lpZipClose = (ZipClosePtr *)GetProcAddress(zipDll, ZIPCLOSENAME);
lpZipFormatMessage = (ZipFormatMessagePtr *)GetProcAddress(zipDll, ZIPFORMATMESSAGENAME);
// Create a ZIP archive on disk named as sZipfile
if (!(result = lpZipCreateFile(&hz, sZipfile, 0)))
{