What’s the differences between .dll , .lib, .h files?

.h: header file, its a source file containing declarations (as opposed to .cpp, .cxx, etc. containing implementations), .lib: static library may contain code or just links to a dynamic library. Either way it’s compiled code that you link with your program. The static library is included in your .exe at link time. .dll: dynamic library. … Read more

Is there any native DLL export functions viewer? [duplicate]

dumpbin from the Visual Studio command prompt: dumpbin /exports csp.dll Example of output: Microsoft (R) COFF/PE Dumper Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file csp.dll File Type: DLL Section contains the following exports for CSP.dll 00000000 characteristics 3B1D0B77 time date stamp Tue Jun 05 12:40:23 2001 0.00 version 1 ordinal … 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);

Target 32 Bit or 64 Bit native DLL depending on environment

Here is the solution I’ve used on many projects: name the 32-bit assembly with a “32-bit oriented name”. For example MyAssembly.Native.x86.dll name the 64-bit assembly with a “64-bit oriented name”. For example MyAssembly.Native.x64.dll compile the managed assembly as ‘Any Cpu’ ship everything in the same path Here is how I declare P/Invoke methods: [DllImport(“MyAssembly.Native.x86.dll”, EntryPoint … Read more