com

How to read a winmd (WinRT metadata file)?

橙三吉。 提交于 2019-12-23 07:00:40
问题 A WinMD is a binary medadata file, that contains everything you need to learn about namespaces, types, classes, methods, parameters available in a native WinRT dll. From Windows Runtime design : The Windows Runtime is exposed using API metadata (.winmd files). This is the same format used by the .NET framework (Ecma-335). The underlying binary contract makes it easy for you to access the Windows Runtime APIs directly in the development language of your choice. Each .winmd file exposes one or

Unload a .NET DLL from an unmanaged process

风流意气都作罢 提交于 2019-12-23 05:39:11
问题 I'm extending my Inno-Setup script with code that I can best implement in C# in a managed DLL. I already know how to export methods from a managed DLL as functions for use in an unmanaged process. It can be done by IL weaving, and there are tools to automate this: NetDllExport (written by me) UnmanagedExports So after exporting, I can call my functions from Pascal script in an Inno-Setup installer. But then there's one issue: The DLL can't seem to be unloaded anymore. Using Inno-Setup's

Windows Forms WebBrowser control error on .net 4.0 framework

只愿长相守 提交于 2019-12-23 05:38:06
问题 I have a fatal error thrown from my c# code where I have customized forms web browser to support browser autocomplete functionality. The exception gets thrown only on .net 4.0 framework, when we try to obtain the WebBrowserSite COM interfaces. error thrown at _baseIDocHostUiHandler = (WebBrowserNativeMethods.IDocHostUIHandler) Marshal.GetTypedObjectForIUnknown(_unkInnerAggregated, typeof (WebBrowserNativeMethods.IDocHostUIHandler)); Code: // constructor public AutoCompleteWebBrowserSite

C# - writing a COM server - events not firing on client

半世苍凉 提交于 2019-12-23 05:20:17
问题 I have implemented a COM server in C#, that has a vb6 client. When going to fire my events, the handlers are always null--it appears that the vb6 app never subscribes to my events. The vb6 application is an existing 3rd party app, and appears to give no error messages. Normal methods work just fine from COM client -> server. Is there anything I can do to debug what is going on? Or why my events are not working? Here is a quick example snippet of my code: [ComVisible(true), Guid(Constants

Writing cell in Excel from C++ - no value written, cell is blank

隐身守侯 提交于 2019-12-23 05:15:43
问题 When I write a cell from C++ with OLE to a cell in Excel, I get an empty cell. Whatever value is there gets overwritten to be blank. It writes in the correct cell though, so it seems the range is correct. This is my code. VARIANT arr; BSTR val = SysAllocString(L"hello excel world"); _bstr_t(val, false); arr.vt = VT_ARRAY | VT_VARIANT; SAFEARRAYBOUND sab[1]; sab[0].lLbound = 1; sab[0].cElements = 1; arr.parray = SafeArrayCreate(VT_VARIANT, 1, sab); long indices[] = {1, 1}; SafeArrayPutElement

JAVA - GPS RECEPTOR sending strange/encoded frames in console

只谈情不闲聊 提交于 2019-12-23 04:54:08
问题 I have a GPS receptor, which send me NMEA frames. My code retrieve these ones, but in a really strange form : I am using PuTTY to see the NMEA frames received by my receptor, and there is no problem. EDIT - Here is the code I am using : public class GPSFrame extends Observable implements Runnable { static Thread myThread=null; static BufferedReader br; static BufferedWriter wr; static PrintWriter out; static InputStreamReader isr; static OutputStreamWriter osw; static java.io.RandomAccessFile

Using Generic lists on serviced component

☆樱花仙子☆ 提交于 2019-12-23 04:50:36
问题 I'm trying to use a generic List as a property on a ServicedComponent class... public class MyCOM : ServicedComponent { public enum MyEnumType { Value1, Value2, Value3 } public List<MyEnumType> MyList { private set; get; } public MyCOM() { MyList = new List<MyEnumType>(); } } The code compiles without errors but when I try to use the MyList property on the com object from a different class no values get added to the list. Google "told me" that I can't use Generics on Components but I'm yet to

WiX register assemblies for COM Interop

拜拜、爱过 提交于 2019-12-23 04:43:33
问题 I'm really struggling with WiX. I have .NET assemblies to install that require registration for COM Interop, AND they must be registered with another framework that requires calling a Register() method in a .NET assembly that's in the GAC. This registration method is a 'black box' with a hidden storage mechanism so I can't perform this operation declaratively. I get that the declaritive approach is best for COM registration, but I have two problems with using heat.exe: RegAsm works, but Heat

how to read multi level list numbers in ms word(word object model)?

情到浓时终转凉″ 提交于 2019-12-23 04:28:54
问题 I want to read multi-level list formats in word. for example,if list is 1.abc 2.def a.ghi b.jkl with the range object for ghi, i want to get the list number string as, 2.a. ghi i got to know that Listformat.ListLevelNumber gives the list level. But not getting any property to get the list numbering in this form. is there any property? or,any work around to get this? or, any concept that can help me? i have gone through some topics in msdn that i felt like may help. and i am having range

icon overlay handlers for namespace extension

南笙酒味 提交于 2019-12-23 04:06:39
问题 I am developing namespace extension which gives a virtual view of files on a server. In this view, I need to provide different states(in use, offline, out of sync, etc) of a file using overlay icons. I was read through article implementing overlay handler, and thought I will try to handle this in one of our overlay handlers, which implement IShellIconOverlayIdentifier interface. I see that IShellIconOverlayIdentifier::IsMemberOf(), and other functions are called only when I access files on