BUG: COM Client Method Call Fails with ERROR_NOACCESS (273721)
The information in this article applies to:
This article was previously published under Q273721 SYMPTOMS
If you use the Microsoft Interface Definition Language (MIDL) option /Oicg to generate the proxy stub code, the COM client's method call fails with ERROR_NOACCESS. You may also receive an Access Violation (0xC0000005) in the stub code. This happens only when you use the MIDL-generated proxy stub dynamic-link library (DLL) to marshal, and there is an empty interface (with no methods in it) in an interface hierarchy.
NOTE: This problem does not occur when the /Os flag is used to generate proxy stub code. However, /Oicf is the only option that supports certain new features of the MIDL compiler.
RESOLUTION
There are two ways to work around this problem:
- Do not use an empty interface.
- If possible, use the /Os flag for MIDL.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 7/12/2001 |
---|
Keywords: | kbbug kbDSupport KB273721 |
---|
|