I have a problem calling this function from a c++ DLL in c#
INT32 WINAPI PM_COM_GetText(INT32 TextId, char* pBuf, INT32 BufSize);
It writes a Text in a buffer for a given text id.
I try to call it with the following c# code, but I constantly get an access violation and don't undrestand why:
public string GetText(Int32 TextId)
{
Int...
I would like to have the ability to process Win32 messages in a console app and/or inside a standalone DLL.
I have been able to do it in .NET with the following article and it works great in C# inside a console app and standalone DLL
http://msdn.microsoft.com/en-us/magazine/cc163417.aspx
Is there a way to do the equivalent with C/C++ W...
Good afternoon,
I have been working on a dll that can use CORBA to communicate to an application that is network aware. The code works fine if I run it as a C++ console application. However, I have gotten stuck on exporting the methods as a dll. The methods seems to export fine, and if I call a method with no parameters then it works...
Sometime back I used a windows tool to see what a process is doing. This tool allowed me to inspect functions exported from DLL. It also allowed me to change the values passed to a function on the fly.
I cannot recollect the name(not sure if that was free or commercial one). Could any one point to me solution that can do this?
(Tools ...
I am trying to do a simple http-server in (c++) dll-file that I can use from managed (C#) application with P/Invoke. I was trying to do this with asynchronous functions (WSAAsyncSelect() and stuff), so that I could manage server by calling functions inside dll whenever needed and after that it would return to my main program. Now I'm not...
I wrote
function CreateProcess(
lpApplicationName:String;
lpCommandLine:String;
lpProcessAttributes:IntPtr;
lpThreadAttributes:IntPtr;
bInheritHandles:Boolean;
dwCreationFlags:Int32;
lpEnvironment:IntPtr;
lpCurrentDirectory:IntPtr;
...
Here is what I want: I have a huge legacy C/C++ codebase written for POSIX, including some very POSIX specific stuff like pthreads. This can be compiled on Cygwin/GCC and run as an executable under Windows with the Cygwin DLL.
What I would like to do is build the codebase itself into a Windows DLL that I can then reference from C# and w...
[DllImport(pathimportdll)]
static extern int InitiateSession(ref _SESSION_INFO sinfo, ref _DEVICE_INFO pDevInfo);
[DllImport(pathimportdll)]
static extern int StartAcquisition();
DLL functions are imported properly. After the call, application is asserting in tcscpy.inl with the message Expression: (L"Buffer is too small" && 0).
...
#include <gtk/gtk.h>
int main( int argc, char *argv[] )
{
GtkWidget *window;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_show (window);
gtk_main ();
return 0;
}
I tried putting various versions of MSVCR80.dll under the same directory as the generated executable(via cm...
I would like to create a reusable interface to transfer some proprietary information over the TCP/IP connection. If given only the choice of either Web Services or distributing a pre-compiled Assembly, what are the pros and cons of using each? This is assuming that Windows OS is used.
...
Hi,
I have created a project VC++ in VS 2008.
I want to call a certain function in an external dll.
How can I add the reference/resource [I am a java guy please forgive if I am using the wrong terms here] to my project so that I can call the functions in the dll.
I have gone through several forums and yet have not found a clear solutio...
Install Shield Premier 2009: Basic MSI Project
I have a dll that is supposed to be removed during uninstall.
But this dll is being used by explorer.exe, it is used for generating windows explorer context menus with their icons(same as the menu items, icons we see when we right click on any file/folder and see the WinRAR items, icons).
...
Hi All,
I am pretty new to managed/unmanaged interoperability and COM concepts.
I received a suggestion of using COM Interop, for using my existing MFC code in C#. But the problem for me is, i have a MFC Dll which is not a valid COM component. How to make this MFC DLLs to have COM-accessible interfaces ready for use in .NET.
I tried t...
How to create dll using gcc compiler/Mingw for visual basic?
...
SQLite from PHX Software has combined a managed assembly (System.Data.SQLite) with an unmanaged dll (the SQLite 32- or 64-bit dll) into one file, and managed to link them together.
How do I do this? Do I need to embed the managed assembly into the unmanaged dll, or vice versa?
ie. my questions are:
In which order do I need to do this...
Like the msvcr70/msvcr80/msvcr90.dll, what's the code like to instruct the linker to link to one of them dynamically?
Or has that anything to do with c/c++,but cmake?
...
Can an assemble have multiple namespaces or is composed of single namespace.
...
Any ideas how to force a GAC DLL into referenced?
Here is my issue, I constantly use a 3rd party DLL that registers itself into the GAC, and when I use it in my project, it reads it from the gac, and when I deploy, I'm always forgetting to add the DLLs since it is not located in the Bin/Referenced folder.
Anyway to force Visual Studio ...
I have a class library(DLL) which has a web reference, its dynamic.
I have copied the setting into the applicationSettings of the web.config but still it keeps referring to the old URI I had set during develoment.
any idea how i can make it take the URI of the web-service from the web.config?
...
I have implemented a DLL including DllMain() entry function:-
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
case DLL_PROCESS_ATTACH:
/* here im doing file memory mapped through CreateFileMapping() API
and using it through MapViewOfFile() API
storing some data struct...