digitalmars.D.learn - COM Example work for anyone?
- Jesse Phillips (16/16) Oct 13 2012 The dmd compiler comes with some example code. One of the
- Richard Webb (3/3) Oct 14 2012 I haven't tried to run it, but as a random guess, does the user
- Jesse Phillips (13/16) Oct 14 2012 Guess that would be it. Specifically told the program to run as
The dmd compiler comes with some example code. One of the examples is for COM. Does this work for anyone else? The dll registration code is failing: SetKeyAndValue() failed. Other output looks good: OLE 2 initialized hMod = 268435456 LoadLibraryA() succeeded pfn = 100033E0, fn = 'DllRegisterServer' dmd -ofdserver .\dserver.d .\chello.d .\dserver.def dmd .\dclient.d .\chello.d I also added a couple pragma's to the files to help with linking pragma(lib, "advapi32.lib"); pragma(lib, "ole32.lib"); pragma(lib, "oleaut32.lib"); pragma(lib, "ole32.lib");
Oct 13 2012
I haven't tried to run it, but as a random guess, does the user your running it as have permissions to write to HKEY_CLASSES_ROOT ?
Oct 14 2012
On Sunday, 14 October 2012 at 19:04:22 UTC, Richard Webb wrote:I haven't tried to run it, but as a random guess, does the user your running it as have permissions to write to HKEY_CLASSES_ROOT ?Guess that would be it. Specifically told the program to run as admin and it works. Should have checked if you left a message here first, but GitHub is better about telling me new messages. My comserver branch's example also has the registration through manifest which I'm not getting to work. Wonder if it is the same issue... This should at least get me started building customer servers such that I can build a much better understanding of how these all fit together and test what works vs what is an environment issue. But I'm getting a little tired for now so I'll probably look at some other aspects for a bit. Thanks for watching my work and helping.
Oct 14 2012