Can Ruby import a .NET dll?

While IronRuby will make short work of talking to your .NET dll (it’ll be literally no code at all), it was abandoned by microsoft, and it never got a large enough open source community to keep it going after that event. I wouldn’t recommend it these days Regarding the COM solution, this may actually be … Read more

Throwing C++ exceptions across DLL boundaries

Throwing C++ exceptions across DLL boundaries is only possible when all modules use the same C++ runtime, in which case they share a heap as well. But this can be a maintenance burden, especially when libraries from multiple vendors are involved, so it is discouraged. If you want error-handling which is portable across multiple compilers/compiler … Read more

Can’t find how to use HttpContent

Just use… var stringContent = new StringContent(jObject.ToString()); var response = await httpClient.PostAsync(“http://www.sample.com/write”, stringContent); Or, var stringContent = new StringContent(JsonConvert.SerializeObject(model), Encoding.UTF8, “application/json”); var response = await httpClient.PostAsync(“http://www.sample.com/write”, stringContent);

Combine 32- and 64bit DLLs in one program

On 64-bit Windows 64-bit processes can not use 32-bit DLLs and 32-bit processes can’t use 64-bit DLLs. Microsoft has documented this: On 64-bit Windows, a 64-bit process cannot load a 32-bit dynamic-link library (DLL). Additionally, a 32-bit process cannot load a 64-bit DLL. You would need a 32-bit process that communicates with the 32-bit DLL … Read more