Strike that, I must have misread the documentation.
Only thing I am wondering is do we really need the (unsigned long) here?
If anyone has a pointer to clear documentation that would be nice; what I found so far leaves some questions open...
Gerald
On Sun, 28 Jun 2009, Gerald Pfeifer wrote:
The generated file include/bits1_5.h is the same before and after this patch, yet somehow the original form strikes me as a bit odd at best...
Gerald
ChangeLog: Fix prototype for GetReplyData().
diff --git a/include/bits1_5.idl b/include/bits1_5.idl index 274a7de..29520e2 100644 --- a/include/bits1_5.idl +++ b/include/bits1_5.idl @@ -39,7 +39,7 @@ interface IBackgroundCopyJob2 : IBackgroundCopyJob } BG_JOB_REPLY_PROGRESS;
HRESULT GetReplyProgress([in, out] BG_JOB_REPLY_PROGRESS *progress);
- HRESULT GetReplyData([out, size_is( , (unsigned long) *pLength)] byte **pBuffer,
- HRESULT GetReplyData([out, size_is((unsigned long) *pLength)] byte **pBuffer, [in, out, unique] UINT64 *pLength); HRESULT SetReplyFileName([unique] LPCWSTR filename); HRESULT GetReplyFileName([out] LPWSTR *pFilename);
2009/6/28 Gerald Pfeifer gerald@pfeifer.com:
Strike that, I must have misread the documentation.
Only thing I am wondering is do we really need the (unsigned long) here?
Yes, as conformance/variance is restricted by NDR to 32-bit quantities. The IDL compiler should warn/error without the cast as it would be silently truncating the value used for computing the memory allocated for storing the array.
If anyone has a pointer to clear documentation that would be nice; what I found so far leaves some questions open...
The DCE/RPC specification would be a good start, but there is probably some MSDN documentation on the limitations of size_is expressions in IDL.