Article ID: 164149
Article Last Modified on 1/6/2006
Description:
Compiling Interface Definition
Build Commands:
midl.exe /ms_ext /char unsigned /c_ext /out "$(InputDir)"
"$(InputPath)"
Output File(s):
$(InputDir)\$(InputName).h
$(InputDir)\dlldata.c
$(InputDir)\$(InputName)_i.c
$(InputDir)\$(InputName)_p.c For version 6.0 and later, set the appropriate MIDL settings for
IMyinterface.IDL in the MIDL section of either the Project/Settings dialog box
or the Properties dialog box.
#pragma comment(lib, "rpcndr.lib")
#pragma comment(lib, "rpcdce4.lib")
#pragma comment(lib, "rpcns4.lib")
#pragma comment(lib, "rpcrt4.lib")Note The file Rpcdce4.dll is no longer included with Microsoft
operating systems. Its functions have been incorporated into the other DLLs. If
you receive a link error on Rpcdce4.lib, remove its comment pragma from the
Rpchelp.c file.
dlldata.c
IMyInterface_i.c
IMyInterface_p.c
LIBRARY PSSAMPLE
DESCRIPTION 'Sample custom interface marshaler'
EXPORTS
DllGetClassObject PRIVATE
DllCanUnloadNow PRIVATE
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATENote Make sure you change the library name to match the name of your
marshaler DLL._WIN32_WINNT=0x400
Description:
Registering Custom Interface Marshaler
Build Command(s):
regsvr32 /s /c "$(TargetPath)"
echo regsvr32 exe. time > "$(OutDir)\regsvr32.trg"
Output File(s):
$(OutDir)\regsvr32.trgAdditional query words: MIDL marshal custom interface
Keywords: kbhowto kbide KB164149