Hi @ll,
I've some trouble to generate native functions without error handling from a tlb.
I need this to check in a project the functions which will throw an exception and may not correct handled.
To find this, I tried to disable the generation of these functions and get a compile error on these.
But disable generation of error handling function did not work:
Sample:
#import "tlbname" raw_interfaces_only raw_dispinterfaces
did not generate the low-level wrapper functions.
I try to get only the following:
HRESULT get_VariantGuid ( BSTR* variantGuid );
But I get:
_bstr_t get_VariantGuid ( );
If I remove the raw_interfaces_only I get both, but this is not what I want. I need only the HRESULT function, as described in the docu:
Suppresses the generation of error-handling wrapper functions, and property declarations that use those wrapper functions.
Also I tried the high_property_prefixes to rename the error handling properties, but this only rename the methods not the properties.
Sample:
#import "tlbname" high_property_prefixes("HighGet", "HighUsePut", "HighUsePutRef")
__declspec(property(get=HighGetVariantGuid))
_bstr_t **VariantGuid**; // <<-- this should also have the prefix "HighGet"
_bstr_t HighGetVariantGuid ( );
Any ideas what can be wrong or how to solve this?
looks like an #import issue?
Edit - Upgrade to 16.10.2
After upgrade to 16.10.2 it didn't compile anymore with
"raw_interfaces_only raw_dispinterfaces"
sample:
1>tlbname.tli(13,42): error C2039: 'get_ApplicationEnvironment': is not a member of 'tlbnamespace::IApplicationInfoProvider'
1>tlbname.tlh(594): message : see declaration of 'tlbnamespace::IApplicationInfoProvider'
the .tlh looks like:
// Created by Microsoft (R) C/C++ Compiler Version 14.29.30038.1 (5db89de9).
....`
` IApplicationInfoProvider : IDispatch
{
//
// Wrapper methods
//
// Methods:
_bstr_t RawGetApplicationEnvironment ( );
_bstr_t RawGetApplicationRelease ( );
_bstr_t RawGetApplicationReleaseExt ( );
struct _StringMap * RawGetApplicationSettings ( );
struct IFrameInfo * RawGetFrameInfo ( );
};
How to test:
Just create a new ATL-DLL project, add the #import
#import "tlbname" raw_interfaces_only raw_dispinterfaces \
raw_property_prefixes("RawGet", "RawUsePut", "RawUsePutRef") \
raw_method_prefix( "RawMethod" ) \
high_property_prefixes("HighGet", "HighUsePut", "HighUsePutRef") \
high_method_prefix ("HighMethod")