Is there an option to mimic namespaces in masm? Wondering if there is something like option casemap:none that will let me declare the following interface:



IMediaControlVtbl STRUCT
; IUnknown Interface
QueryInterface dd ?
AddRef dd ?
Release dd ?
; IDispatch Interface
GetTypeInfoCount dd ?
GetTypeInfo dd ?
GetIDsOfNames dd ?
Invoke dd ?
; IMediaControl Interface
Run dd ?
Pause dd ?
Stop dd ?
StopWhenReady dd ?
GetState dd ?
RenderFile dd ?
AddSourceFilter dd ?
get_FilterCollection dd ?
get_RegFilterCollection dd ?
IMediaControlVtbl ENDS


It doesn't like the Invoke dd ? for obvious reasons. Do I have to rename that structure member or is there a "compiler" flag/option?
Posted on 2002-05-19 11:38:57 by grv575
Non that im aware of. And have been thu the doc's many times at this point.

This is a simular problem with other WINDOWS.INC headers, where entries like 'CX' had to be changed. If you discover a solution, please let us know ;)

NaN
Posted on 2002-05-19 15:06:34 by NaN
grv575,

As you are aware, the problem is that ML.EXE will not accept reserve words or mnemonics as structure members so the only alternative is to rename any conflicts so that the problem does not occur.

With the structure you posted, the data types and sizes are DWORD (dd) so there should be no problem using it, the name in the code is only a place holder for the address in the structure.

If you want to keep as close as possible to the original names for documentation purposes, prefix a leading underscore to words like INVOKE so that you have _INVOKE or some other similar minor modification.

Regards,

hutch@movsd.com
Posted on 2002-05-19 20:08:37 by hutch--
you can get around that by using the option:

OPTION NOKEYWORD:<invoke>

if you do this dont plan on invoking any api calls because it wont work any longer and you will end of having to use call instead.
Posted on 2002-05-19 20:43:38 by smurf