windows-ce

How to bind c++ dll to my C# program - winCE

落爺英雄遲暮 提交于 2021-02-08 06:50:00
问题 i need to bind C++ dll to my C# WinCE program. (scanner dll) how i can do it ? thank's in advance 回答1: You need to use Interop to call into unmanaged code. using System.Runtime.InteropServices; // DllImport public class Win32 { [DllImport("User32.Dll")] public static extern void SetWindowText(int h, String s); } Here is an article that discusses the topic in detail (also where the code is sourced from). http://msdn.microsoft.com/en-us/magazine/cc301501.aspx 回答2: An alternative to InterOp is

How to bind c++ dll to my C# program - winCE

不羁的心 提交于 2021-02-08 06:48:49
问题 i need to bind C++ dll to my C# WinCE program. (scanner dll) how i can do it ? thank's in advance 回答1: You need to use Interop to call into unmanaged code. using System.Runtime.InteropServices; // DllImport public class Win32 { [DllImport("User32.Dll")] public static extern void SetWindowText(int h, String s); } Here is an article that discusses the topic in detail (also where the code is sourced from). http://msdn.microsoft.com/en-us/magazine/cc301501.aspx 回答2: An alternative to InterOp is

VS 2008 SP1 can't deploy on MC9200 with Windows CE 7.0

北城以北 提交于 2021-01-29 07:47:58
问题 Whenever I try to deploy solution to above mentioned device I'm getting error: Connection Failed. The RPC Server is unavailable. I tried the solutions from following link, but no help: https://www.auslogics.com/en/articles/fixing-the-rpc-server-is-unavailable-error-in-windows/ Windows Mobile Device Center says device is connected. 回答1: I managed to dig up an old email (June 2012) which gives some instructions I sent to my team: Install Microsoft® Visual Studio 2008 with Service Pack1 (make

Return string from c++ dll export function called from c#

僤鯓⒐⒋嵵緔 提交于 2021-01-20 20:12:12
问题 I am trying to return a string from a c++ dll export function. I am calling this function from c#. I have seen a lot of examples on the internet and I am really confused what to do. My c++ code to export function: extern "C" __declspec(dllexport) char* __cdecl getDataFromTable(char* tableName) { std::string st = getDataTableWise(statementObject, columnIndex); printf(st.c_str()); char *cstr = new char[st.length() + 1]; strcpy(cstr, st.c_str()); return cstr; } When I try to call this function

Return string from c++ dll export function called from c#

筅森魡賤 提交于 2021-01-20 20:07:43
问题 I am trying to return a string from a c++ dll export function. I am calling this function from c#. I have seen a lot of examples on the internet and I am really confused what to do. My c++ code to export function: extern "C" __declspec(dllexport) char* __cdecl getDataFromTable(char* tableName) { std::string st = getDataTableWise(statementObject, columnIndex); printf(st.c_str()); char *cstr = new char[st.length() + 1]; strcpy(cstr, st.c_str()); return cstr; } When I try to call this function

Return string from c++ dll export function called from c#

喜夏-厌秋 提交于 2021-01-20 20:06:11
问题 I am trying to return a string from a c++ dll export function. I am calling this function from c#. I have seen a lot of examples on the internet and I am really confused what to do. My c++ code to export function: extern "C" __declspec(dllexport) char* __cdecl getDataFromTable(char* tableName) { std::string st = getDataTableWise(statementObject, columnIndex); printf(st.c_str()); char *cstr = new char[st.length() + 1]; strcpy(cstr, st.c_str()); return cstr; } When I try to call this function

Which locations on a handheld device are used by installed .exes for their dependent files?

主宰稳场 提交于 2020-02-06 03:40:16
问题 I have what seems to me an odd situation: an old .exe of the project on which I'm working runs on a handheld device. New versions don't (even the exact same code with no additions). Even that .exe that runs on one handheld device doesn't on the other. See this for some of the gory details. Based on this, I thought I could track down the problem. But this PC util tells me what is missing from that (PC/build machine) environment. I need to know what is missing/wrong on the CE device. So to

Which locations on a handheld device are used by installed .exes for their dependent files?

ぃ、小莉子 提交于 2020-02-06 03:40:07
问题 I have what seems to me an odd situation: an old .exe of the project on which I'm working runs on a handheld device. New versions don't (even the exact same code with no additions). Even that .exe that runs on one handheld device doesn't on the other. See this for some of the gory details. Based on this, I thought I could track down the problem. But this PC util tells me what is missing from that (PC/build machine) environment. I need to know what is missing/wrong on the CE device. So to

How can I determine free space on a Windows CE device?

喜你入骨 提交于 2020-01-17 04:17:11
问题 I need to determine how much free space there is on a Windows CE device, to conditionally determine whether a particular operation should proceed. I thought Ken Blanco's answer here (which bears a striking similarity to the example yonder) would work, which I adapted as: internal static bool EnoughStorageSpace(long spaceNeeded) { DriveInfo[] allDrives = DriveInfo.GetDrives(); long freeSpace = 0; foreach (DriveInfo di in allDrives) { if (di.IsReady) { freeSpace = di.AvailableFreeSpace; } }