The function I am using contains three parameters where one of which requires a flag (fCreationDisposition):
function MpqOpenArchiveForUpdate(lpFileName: LPCSTR; fCreationDisposition, dwHashTableSize: DWord): THandle; stdcall; external 'lmpqapi.dll';
The documentation states that there are five usable flags. However, when I use any of the flags Delphi tells me that it is an “undeclared identifier”.
Is there anything extra that I must add in order to be able to access the flags without Delphi telling me that it is an “undeclared identifier”?
Note: Under the uses section I have called for the function:
function MpqOpenArchiveForUpdate(lpFileName: LPCSTR; fCreationDisposition, dwHashTableSize: DWord): THandle; stdcall; external 'lmpqapi.dll';
You have to define the flags in your code. In Delphi, you have to define everything from scratch, you cannot utilize any pre-made API header files that belong to the DLL, like you can in C/C++. So you have to track down the flag numeric values (since the documentation does not provide them) and declare them in your code, eg: