I've created a dll using managed C++. Now I'm trying to use it from C#. I've added the Object to project references. Object browser shows the object in the dll correcly, path to the dll in object browser corresponds to the actual path.
However, when I run the C# program it complains:
Unhandled Exception: System.IO.FileNotFoundException...
I've been evaluating various smart pointer implementations (wow, there are a LOT out there) and it seems to me that most of them can be categorized into two broad classifications:
1) This category uses inheritance on the objects referenced so that they have reference counts and usually up() and down() (or their equivalents) implemented....
I need a timer to execute callbacks with relatively low resolution. What's the best way to implement such C++ timer class in Linux? Are there any libraries I could use?
...
I have 2 vector of with one has vec1{e1,e2,e3,e4} and the other one with vec2 {e2,e4,e5,e7}
How to effectively get three vector from above vectors such that 1.has elements that is available only in vec1 similarly 2 has only vec2 elements and 3.with common elements
...
I have a class (class A) that is designed to be inherited by other classes written by other people.
I also have another class (class B), that also inherits from A.
B has to access some A's member functions that shouldn't be accessed by other inheriting classes.
So, these A's member functions should be public for B, but private for othe...
I have an array of unsigned numbers, called dataArray (actually in the program I am trying to figure out, they are entered as hexadecimal numbers, but I don't think that's important). I have another variable of type unsigned char, called c.
What does this do?
unsigned int dataArray[]={1,2,3,4,5};
unsigned char c;
x=c^ (dataArray)[i];
...
Hi,
I'm passing some numeric arguments while creating a process (in VC++)
I'm stuck at casting LPTSTR to int.
Thanks in advance,
...
Quick question regarding UTF-8 support and various Win32 API's.
In a typical C++ MFC project, is it possible for MessageBox() to display a UTF-8 encoded string?
Thanks,
Andrew
...
Hi
I'm working in a C++ unmanaged project.
I need to know how can I take a string like this "some data to encrypt" and get a byte[] array which I'm gonna use as the source for Encrypt.
In C# I do
for (int i = 0; i < text.Length; i++)
buffer[i] = (byte)text[i];
What I need to know is how to do the same but using unmanaged C++....
Hello,
I've got most of the code for writing a value to the windows registry, however when I change the path to a dummy key and value that I've set up for testing it fails. My code is below:
HKEY hKey;
LPCTSTR sk = TEXT("SOFTWARE\TestSoftware");
LONG openRes = RegOpenKeyEx(HKEY_LOCAL_MACHINE, sk, 0, KEY_ALL_ACCESS , &hKey...
i have something like shared_ptr t(makeSomething(), mem_fun(&Type::deleteMe))
i now need to call C styled func that require a pointer to Type. How do i get it from shared_ptr?
...
Normally, when I use Visual Studio to do a build, I see warnings and errors shown in the output pane, e.g.
1>------ Build started: Project: pdcuda, Configuration: Release x64 ------
Compiling...
foo.cpp
Linking...
foo.obj : error LNK2001: unresolved external symbol "foo"
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =...
I have an unmanged C++ class I have written in an unmanged dll. I have a managed dll that references the unmanaged dll. Can a class in the managed dll derive from the unmanaged class?
Using Visual Studio 2008
...
I tend to use POSIX Threads, when programming in C, under Linux.
Without MFC
Question:
How would I then create threads in VC++?
Find more information on threads under win32?
Edit:
Brief illustrations
I LOVE stackoverflow - best resource for students!
Regards
...
So...
when I go:
cout<<stringName<<endl;
I get:
NT
But when I go:
cout<<stringName.c_str()<<endl;
I get:
NTNT
Why?
...
Sooooo I'm writing a script interpreter. And basically, I want some classes and functions stored in a DLL, but I want the DLL to look for functions within the programs that are linking to it, like,
program dll
----------------------------------------------------
send code to dll-----> parse code
...
Thread to wait infinitely in a loop until a flag state change, then call function.
pseudo code illustration:
while (true)
{
while (!flag)
{
sleep(1);
}
clean_upfunction();
}
Currently:
Using the multithreaded versions of the C run-time libraries only
No:
MFC
Question:
Is there a more efficient way o...
Hi,
I would like to write a cluster aware application that will track after the status of a cluster group.
to be more specific, I'd like to probe after the group's Owner. The application should know if the local machine is the owner of the group or not and behave accordingly.
can I probe the registry for that? if yes, where? if not, d...
We'd like to support some hardware that has recently been discontinued. The driver for the hardware is a plain 32-bit C DLL. We don't have the source code, and (for legal reasons) are not interested in decompiling or reverse engineering the driver.
The hardware sends tons of data quickly, so the communication protocol needs to be pretty...
I'm working on a project using C++, Boost, and Qt. I understand how to compress single files and bytestreams using, for example, the qCompress() function in Qt.
How do I zip a directory of multiple files, including subdirectories? I am looking for a cross-platform (Mac, Win, Linux) solution; I'd prefer not to fire off a bunch of new pr...