Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with dll 1

Status
Not open for further replies.

ahoodin

Programmer
Jul 25, 2001
48
US
PROBLEM 1 : UINT32 and INT32 redefinition within header file
c:\program files\microsoft visual studio\vc98\include\basetsd.h(41) : see declaration of 'UINT32'
c:\projects\edmutils\addunzip.h(26) : error C2371: 'INT32' : redefinition different basic types
SOLUTION 1 : commented definitions out of addzip.h and addunzip.h NOW no longer get that compiler message
PROBLEM 2 : (what does chkesp do?)
Debug Error!
Program C:\PROJECTS\EDMUTILS\DEBUG\EDMUTILS.EXE
MODULE:
FILE: I386\CHKESP.C
THE VALUE OF ESP WAS NOT PROPERLY SAVED ACROSS A FUNCTION CALL.
THIS IS USUALLY A RESULT OF CALLING A FUCNTION DECLARED WITH
ONE CALLING CONVENTION WITH A FUNCTION POINTER DECLARED WITH
A DIFFERENT CALLING CONVENTION.

(PRESS RETRY TO DEBUG THE APP)
ABORT RETRY IGNORE

SOLUTION 2: CREATED A TINY INLINE FUNCTION STUB IN THE addzip.h file void _chkesp(void){}.
Now I no longer get the runtime error.

PROBLEM 3: NOW I GET AN ACCESS VIOLATION AT ccccccd3 AFTER THE APPLICATION TERMINATES.
ALSO THERE DO NOT APPEAR TO BE ANY ZIP FILES CREATED. My application is just a generic
Windows32 Application, no window thus there is no hwnd. Here is the extent of it.
#include "stdafx.h"
#include <io.h>
#include &quot;addzip.h&quot;
#include &quot;addunzip.h&quot;
#include &quot;errno.h&quot;
#define TRUE 1
#define FALSE 0
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
short I;
char cWinDir[256];
char cFiles[256];
char *cArchive = &quot;TEST32.ZIP&quot;;
GetWindowsDirectory((LPSTR)cWinDir, sizeof(cWinDir));
wsprintf(cFiles, &quot;%s\\*.INI&quot;, cWinDir);
addZIP_Initialise();
addUNZIP_Initialise();
addZIP_ArchiveName(cArchive);
addZIP_Include(cFiles);
I = addZIP_GetLastError();
strerror(errno);
// I = addZIP_Recurse(TRUE); //was getting an error here for some reason
addZIP_SetCompressionLevel(0x02);
I = addZIP(); //now returns a negative number...that is not good.
unlink(cArchive);
return 1;
}
SOLUTION 3: TO BE DETERMINED.
Is there anyone out there who can help?
thanks in advance,
ahoodin
 
I think the problem 3 comes out of problem 2 which you have solved in a awkward way.

The chkesp is a rutine that monitorizes the function calls, parameter passing, types of parameters and calling convention.

I think you should check your function calls on this aspects.

Hope this helps, s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darkness...
 
This is a good point. I didnt think my underlying problems were necessarily solved in problem #2.

HHOS
ahoodin

Thanks for your reply.

I am a cross compiler on weekends I dress up as PASCAL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top