Is there any method to expose COM interface from C# executable(EXE)? All examples I have seen were to expose COM interface from C# class library. Please help.
prvn
Is there any method to expose COM interface from C# executable(EXE)? All examples I have seen were to expose COM interface from C# class library. Please help.
prvn
what happens if my client applications are not using .NET?
prvn
Hi All, I am new to .NET platform. I have a C#.NET executable(.EXE) application. I would like to expose some interfaces for my client applications. What are the possible options for doing this? Some of my ideas are.. 1. Exposing interfaces via COM Interop 2. Using .NET remoting Please help.
prvn
Sorry. No :(
prvn
I think there is no easy method to do this. You have to store each language strings separately and use them based on the language selection from menu.
prvn
When returning char* as return value, you must allocate memory in heap(using malloc or new), from your DLL and deallocate this memory(free or delete) after usage from the calling applciation.
prvn
RUNTIME_CLASS macro will only take class name as parameter.
prvn
The m_sTest is a UNICODE string. So if you want to convert this UNICODE string to char* use WideCharToMultiBye API or use CRT function wcstombs.
prvn
I think Windows will send WM_WINDOWPOSCHANING message for all type of windows. There is no exception in this case.
prvn
How are you calculating this nBlockLength?
prvn
use some logic like this. CString csText; GetWindowText(csText); SetWidnowText( csText+csNewString);
akt
Use GetPrivateProfileString
akt
use strtol with 16 as base.
akt
The below link will help you. http://www.codeproject.com/KB/threads/extended\_thread.aspx
akt
Please check the last parameter of SendInput(); It requires the size of structure INPUT. For this you have call sizeof(INPUT). In your code, you have taken sizeof(i). i means LPINPUT. As i said earlier LPINPUT is a pointer. So sizeof(i) will return the size of a pointer variable only(4 bytes).
akt
LPINPUT i; LPINPUT means pointer to structure INPUT. Here i is of type LPINPUT. You have to allocate memory for this before you use this variable. ie LPINPUT i = new INPUT;
akt
If your target applciation has a window, you can find your target application using FindWidnow() API. This will return the window handle of the target application. Using that handle you can send WM_CLOSE message. Ex: HWND hWnd = ::FindWindow( NULL, "TargetAppName" ); ::SendMessage( hWnd, WM_CLOSE );
akt
Which value did u take? R G and B from color map?
akt
Hope you have read the ColorMap completely from source bitmap. That is you have to allocate enough memory for reading the complete ColorMap(256 colors) for source image. The following code will do this. BYTE* pbyThumbImage // This is your source bitmap buffer. const ULONG COLORMAP_START_OFFSET = sizeof( BITMAPFILEHEADER ) + sizeof( BITMAPINFOHEADER ); // Color map starts after Bitmap file header and Bitmap info header. UINT uColorMapSize = 256 * sizeof( RGBQUAD ); pBmpInfoHdr = reinterpret_cast( GlobalAllocPtr( GHND, sizeof( BITMAPINFOHEADER ) + uColorMapSize )); memcpy( pBmpInfoHdr->bmiColors, ( pbyThumbImage + COLORMAP_START_OFFSET ), uColorMapSize ); // Now complete colormap information is within your pBmpInfoHdr->bmiColors. Now you can write this colormap to destination file using fwrite with input buffer as pBmpInfoHdr->bmiColors and size to be written as uColorMapSize.
akt