"vc-programmer" <vcprogrammer@discussions.microsoft.com> wrote in message
firstly, thanks for all your responses Igor. you have posted responses to
my
questions on other forums as well, and i appreciate your help resolving
the
issues i run into...
Why do you care? Just include that header and declare your pointer as
typedef int (CALLCONV * unzLocateFile_t)(
unzFile file, const char *szFileName, int iCaseSensitivity);
i am new to using dlls, so i dunno whether i should care about it in the
typedef or not; have the following questions -
1> wouldnt my code need to 'understand' what are the members of unzFile?
if
The header file is provided to take care of that. All you need to do is
not, what use is a typedef, coz i can declare it as ::
typedef int (CALLCONV * unzLocateFile_t)(
dinosaur file, const char *szFileName, int iCaseSensitivity);
what does the compiler know anyway - whether I call it a unzFile or a
dinosaur?
or, since the symbols should be 'present' in the zipfile, so i dont need
to
care (i am making a wild guess here)
2> what happens if i need to modify some data which is filled in unzFile?
thanks
"Igor Tandetnik" wrote:
vc-programmer <vcprogrammer@discussions.microsoft.com> wrote:
i am getting stuck in usage of the 'unzLocateFile' function. i am
loading the dll using LoadLibrary, and getting the address of the
function using GetProcAddress. Now, to use 'unzLocateFile' , i need
to typedef it. This is where i am getting stuck, a detailed
description is as under -
in unzip.h (the source of minizip), its prototype is defined as -
extern int ZEXPORT unzLocateFile OF((unzFile file, const char
*szFileName, int iCaseSensitivity));
i went looking for declaration of unzFile(its a structure)
Why do you care? Just include that header and declare your pointer as
typedef int (CALLCONV * unzLocateFile_t)(
unzFile file, const char *szFileName, int iCaseSensitivity);
Replace CALLCONV with the calling convention the function in the DLL
uses (most likely __stdcall, but you may want to make sure by figuring
out what ZEXPORT expands to).
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925