20 g_IsCOM = IsComRequest();
21 if (!g_IsCOM)
22 {
23 BEGIN_ENTRYPOINT();
24 rpcdump_main(g_argc, g_argv);
25 END_ENTRYPOINT();
26 return 0;
27 }
28
29
// If we get this far then this is an instantiation request
30 // and therefore we do not need (or want) a console.
31 FreeConsole();
32
33
// Thread Local Storage (TLS) is used to keep track of
34 // stateful information when the rpcdump_main routine is
35 // called. To see how this is used, see SetInterfaceID
36 // (and it's associated functions) and the IRpcEnum::Execute
37 // method.
38 g_dwCOMCallTls = TlsAlloc();
39 int nRes = __super::WinMain(nShow);
40 TlsFree(g_dwCOMCallTls);
41
42
return nRes;
43 }
44
45
// The following function specializes COM registration
46 HRESULT RegisterServer(BOOL bregTypeLib = 0, ...