hi I am using one C++ dll in my C# compact frame work application C# private void button1_Click(object sender, EventArgs e) { try { Message("vijay"); //OpenDatabase(hDB, guid); } catch (DllNotFoundException de) { MessageBox.Show(de.Message, "Dll not found"); } catch (EntryPointNotFoundException ent) { MessageBox.Show(ent.Message, "Entry point ex"); } catch (MissingMethodException me) { MessageBox.Show(me.Message, CallingConvention.Winapi.ToString()); } } ____________________ C++ dll: #include "windbase.h" #include <string.h> CEOID CeOid = 0; CEGUID guid; BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } extern "C" __declspec(dllexport) void __stdcall Message(TCHAR* p_szMessage) { MessageBox(NULL, p_szMessage, _T("Message from DLL"), MB_OK); } _________ This is my code but it is showing that message missing exception. Can Any one help me in figuring out the error area. Thanks in Advance
vijaywithu
Posts
-
C++ dll in C# -
EDB file using C#I tried using EnterpriseDB.EDBClient; but it is saying that it is not found. I am new to this. The thing is i am doing it in compact frame work. Can u please tell me why would it show like this. Provide me with some samples please
-
EDB file using C#How do we open and read data from an .edb file using C# in windows mobile. I have been trying that but i could nt do it in C#. Can Anybody Help me in this regard with a helpful code snippet Thanks in Advance.
-
EDB from C# in Windows MobileHow do we open and read data from an .edb file using C# in windows mobile. I have been trying that but i could nt do it in C#. Can Anybody Help me in this regard with a helpful code snippet Thanks in Advance.
-
Get time zones in windows mobileHi friends, I am currently working on windows mobile. I need to know how to get different time zones in mobile. GetSystemTimeZones() function is not available in .NET compact framework. what would i do to over come this.. Thanks in Advance
-
WinCe Screen shot of windowsCan Any one please help me to get the screen shot of the windows opened in the desktop on CE Device machine. How would the screen shot be saved as bitmap file in the device machine. A code snippet would be help ful. Thanks in Advance
-
C# -Savefile Dialog to save an image filehi friends I am new to .NET, I have the following code to save an image file in specific location. It does compile and it is showing that null reference eexception is unhandled it is asking to create an object instance in this line (System.Drawing.Imaging.ImageFormat) how can it be done any help please SaveFileDialog save = new SaveFileDialog(); save.Filter = "JPeg Image|*.jpg|Bitmap Image|*.bmp|Gif Image|*.gif"; save.Title = "Save the File"; save.ShowDialog(); string fName = save.FileName; if (save.FileName != "") { System.IO.Stream fileStream = (System.IO.FileStream)save.OpenFile(); switch (save.FilterIndex) { case 1: this.button7.Image.Save(fileStream, System.Drawing.Imaging.ImageFormat.Jpeg); break; case 2: this.button7.Image.Save(fileStream, System.Drawing.Imaging.ImageFormat.Gif); break; case 3: this.button7.Image.Save(fileStream, System.Drawing.Imaging.ImageFormat.Bmp); break; } fileStream.Close(); } }
-
Update data in CEDB using C++ and win32 APIsHi i am using CEDB to access windows CE datas.. Now i need to update the datas in CEDB. code: oid=CeSeekDatabaseEx(globalHDB,CEDB_SEEK_BEGINNING,seekcount,NULL,NULL); I use it to seek in database for each cases i uses case 0: epropColumn[0].propid = CID_BOOKID; cepropColumn[0].val.lpwstr=szBookID; cepropColumn[0].wFlags = NULL; cepropColumn[0].wLenData = 0; to get the column values i use these cases for each column of the row. Can any one help me to change only one value in the row. for example if i hav book id,book_name,author. say bk001,C++,martin i need it to be changed as bk001,Java,martin A code snippet would be help ful. Help me to trace it out. Thanks in Advance.
-
SQL CE in C++ for windows CE device using standard SDKHi I am new to this embedded coding and i need to connect to the SQL CE database for windows CE database. i am using standard SDK in visual studio 2005 environment. when i use DBPROPSET it is showing C2065 undeclared error. The same error is coming for the other structures also. could any one help me in connecting to the database ( SQL CE ) and access the database for inserting and retrieving. a sample code snippet would be helpful. Thanks in Advance.
-
starting an application while booting in WinCEHi, I want to run myapp.exe while starting the CE device machine So that it runs in the background forever till the machine turns of I have added the values in HKLM\init key in registry so that "Launch70" = "myapp.exe" and depend70 value But still i face the challenge that while restarting the machine it does nothing could anyone help me to figure out where i am lacking now in this regard. I want myapp.exe to run on each time the system(Device) gets started without importing my exe everytime. Thanks in Advance
-
handle to a window created by createprocessI am in a serious deputation buddy...
-
handle to a window created by createprocessI am sorry i could get what does A hammer is.. could you please throw some light on this area..
-
handle to a window created by createprocessI am sorry not exactly i want to close the process slavisa i need to close that window alone and should open the next command line say next.wmv in that place
-
handle to a window created by createprocessFriens i used GetWindowThreadProcessId(hwnd, &dwProcessId); and also PostMessage(hwnd,WM_CLOSE,0); but it is not moving into that if loop still if(dwprocessid == DWORD(param)) i could not figure it out what i need to do now or IS there any other way to get the handle of the window seeking ur help....
-
handle to a window created by createprocessFriens i used GetWindowThreadProcessId(hwnd, &dwProcessId); and also PostMessage(hwnd,WM_CLOSE,0); but it is not moving into that if loop still if(dwprocessid == DWORD(param)) i could not figure it out what i need to do now or IS there any other way to get the handle of the window seeking ur help....
-
handle to a window created by createprocessThanks Slavisa, I tried it. but it does nothing i donno why.. Could u please help me further with my code below: (I want to close the console that created within 3 seconds but it is not moving into that if part (bold)) CreateProcess(_T("\\windows\\iesample.exe"),imFullPath, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, NULL, &processInfo1); Sleep(3000); EnumWindows(&EnumProc,processInfo1.dwProcessId); BOOL CALLBACK EnumProc(HWND hwnd, LPARAM param) { DWORD id = GetWindowThreadProcessId(hwnd, NULL); if (id == (DWORD)param) { DestroyWindow(hwnd); return false; } return true; }
-
handle to a window created by createprocessI have used createProcess to run a process in a new window using CREATE_NEW_CONSOLE flag, Can any one help to get the handle to the console that i have created so as to close that window. code: CreateProcess(_T("\\windows\\ceplayer.exe"),_T("c:\\folder\\new.wmv"), NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, NULL, &processInfo); Thanks in Advance
-
CreateProcess in WinCEThank u sethuraman.k, Do you have any idea regarding my issue of playing the files in a row if yes guide me in this regard. and could you please tell me how to get the handle to the windows that have been created from createprocess(winceplayer). so that i can use that handle to close the respective window
-
CreateProcess in WinCEhi i am a fresher for WinCE and i am using createprocess to run one winceplayer application once the commandline in the create process gets executed i want another files on the row to be executed could anyone please help me in this regard CreateProcess(_T("\\windows\\ceplayer.exe"),_T("c\\folder\\new.wmv"), NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, NULL, &processInfo); once new is done i want next.wmv to be run Thanks in Advance