I am quite new to C++ programming and IDL, sop hopefully someone here
can point me in the right direction.
In IDL, I get an error when compiling the following:
[id(1), helpstring("method SendFileToClient")] HRESULT SendFileToClient(
[in] EXTENSION_CONTROL_BLOCK * pecb,
[in] BSTR bstrFilename
);
saying: error MIDL2025 : syntax error : expecting a type specification
near "EXTENSION_CONTROL_BLOCK"
I have tried declaring the EXTENSION_CONTROL_BLOCK structure in the IDL,
but that did not help.
Does anyone have a clue or point me at least in the right direction?
TIA,
--
David Valera
While this reponse is not going to give you the solution, I hope you know
where to look. If you would like further help perhaps you could post more
of the code?
Regards,
Neil Groves
Irrational Dafodil Ltd
"David Valera" <da...@altavista.nl> wrote in message
news:MPG.163637a24...@msnews.microsoft.com...
The questions is, how to correctly declare this EXTENSION_CONTROL_BLOCK
in IDL. I have the following declared:
import "oaidl.idl";
import "ocidl.idl";
typedef BYTE far *LPBYTE;
#define HSE_LOG_BUFFER_LEN 80
typedef LPVOID HCONN;
typedef struct _EXTENSION_CONTROL_BLOCK {
DWORD cbSize; // Size of this structure.
DWORD dwVersion; // Version info of this specification.
HCONN ConnID; // Context number not to be modified!
DWORD dwHttpStatusCode; // HTTP Status code.
CHAR lpszLogData[HSE_LOG_BUFFER_LEN]; // Null-terminated log info.
LPSTR lpszMethod; // REQUEST_METHOD
LPSTR lpszQueryString; // QUERY_STRING
LPSTR lpszPathInfo; // PATH_INFO
LPSTR lpszPathTranslated; // PATH_TRANSLATED
DWORD cbTotalBytes; // Total bytes indicated from client.
DWORD cbAvailable; // Available number of bytes.
LPBYTE lpbData; // Pointer to cbAvailable bytes.
LPSTR lpszContentType; // Content type of client data.
} EXTENSION_CONTROL_BLOCK;
[
object,
uuid(32C6A7CF-B13F-4ba0-86B0-C546EEEA6208),
dual,
helpstring("IUniTest Interface"),
pointer_default(unique)
]
interface IUniTest : IDispatch
{
[id(1), helpstring("...")] HRESULT SendFileToClient(
[in] EXTENSION_CONTROL_BLOCK * pecb,
[in] BSTR bstrFilename
);
};
[
uuid(A0698668-6935-4906-948C-6EB322AC8214),
version(1.0),
helpstring("Test 1.0 Type Library")
]
library TestLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[
uuid(CB994E2E-F1C5-4f79-91C7-0B97832AFB4B),
helpstring("Test Class")
]
coclass WebDavExt
{
[default] interface IUniTest;
};
};
> While this reponse is not going to give you the solution, I hope you know
> where to look. If you would like further help perhaps you could post more
> of the code?
Whatever I do I keep getting error MIDL2139 : type of the parameter
cannot derive from void or void * : [ Type 'LPVOID' ( Parameter 'pecb' )
]
Any ideas would be helpfull
--
David Valera