Click here to Skip to main content
15,908,455 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Printing using GDI Pin
«_Superman_»16-Feb-09 18:16
professional«_Superman_»16-Feb-09 18:16 
AnswerRe: Printing using GDI Pin
Iain Clarke, Warrior Programmer18-Feb-09 1:52
Iain Clarke, Warrior Programmer18-Feb-09 1:52 
QuestionHow to compile a native (ie. using NT API instead of Win32) x64 app ? Pin
Defenestration16-Feb-09 7:50
Defenestration16-Feb-09 7:50 
AnswerRe: How to compile a native (ie. using NT API instead of Win32) x64 app ? Pin
Richard Andrew x6416-Feb-09 16:30
professionalRichard Andrew x6416-Feb-09 16:30 
AnswerRe: How to compile a native (ie. using NT API instead of Win32) x64 app ? Pin
«_Superman_»16-Feb-09 18:19
professional«_Superman_»16-Feb-09 18:19 
QuestionProblem with dll... Pin
Member Ártemis16-Feb-09 5:28
Member Ártemis16-Feb-09 5:28 
AnswerRe: Problem with dll... Pin
Taran916-Feb-09 6:03
Taran916-Feb-09 6:03 
GeneralRe: Problem with dll... Pin
Member Ártemis16-Feb-09 7:09
Member Ártemis16-Feb-09 7:09 
Thanks for your atention...
At the beginning I thought that was the problem and decided to do something very basic for testings, but I still can not access to it.
For my testings I made:

//MyDll.cpp
#include "MyDll.h"
namespace Functions{
Person MyFunctions::first() {
struct Person myPerson;
myPerson.name = "asd";
myPerson.age = 123;
return myPerson;
}
}

//MyDll.h
namespace Functions{
struct Person {
char *name;
int age;
};
class MyFunctions {
public:
static __declspec(dllexport) Person first();
};
}

Then the DLL file I paste in the new project folder (only this one, because for my point of view I don't need nothing more, because it is very simple and doesn't use/depend nothing more ), right?

In the new project I made:

#include "stdafx.h"
#include "windows.h"
using namespace System;

int main(array<System::String ^> ^args){
HINSTANCE myDll = LoadLibrary((LPCWSTR)"TestingDll.dll");
if(myDll) {
Console::WriteLine("DLL loaded \n");
}
else {
Console::WriteLine("DLL failed to load \n");
}
return 0;
}

And the result always is -> "DLL failed to load".

It doesn't returns any error, but doesn't do what I want .
I apologize, but due to my inexperience I did not understand the problem that could cause this ( for sure is something that I'm doing wrong, or forget).
Can you help me?
AnswerRe: Problem with dll... Pin
CPallini16-Feb-09 6:52
mveCPallini16-Feb-09 6:52 
GeneralRe: Problem with dll... Pin
Member Ártemis16-Feb-09 7:18
Member Ártemis16-Feb-09 7:18 
GeneralRe: Problem with dll... Pin
CPallini16-Feb-09 7:38
mveCPallini16-Feb-09 7:38 
GeneralRe: Problem with dll... Pin
regnwald16-Feb-09 18:44
regnwald16-Feb-09 18:44 
GeneralRe: Problem with dll... Pin
CPallini16-Feb-09 21:34
mveCPallini16-Feb-09 21:34 
GeneralRe: Problem with dll... Pin
CPallini16-Feb-09 21:44
mveCPallini16-Feb-09 21:44 
AnswerRe: Problem with dll... Pin
Richard Andrew x6416-Feb-09 16:37
professionalRichard Andrew x6416-Feb-09 16:37 
GeneralRe: Problem with dll... Pin
Member Ártemis16-Feb-09 23:04
Member Ártemis16-Feb-09 23:04 
GeneralRe: Problem with dll... Pin
Richard Andrew x6417-Feb-09 2:00
professionalRichard Andrew x6417-Feb-09 2:00 
GeneralRe: Problem with dll... Pin
Member Ártemis17-Feb-09 4:56
Member Ártemis17-Feb-09 4:56 
GeneralRe: Problem with dll... Pin
Richard Andrew x6417-Feb-09 12:33
professionalRichard Andrew x6417-Feb-09 12:33 
GeneralRe: Problem with dll... Pin
Member Ártemis17-Feb-09 23:46
Member Ártemis17-Feb-09 23:46 
QuestionConvert const string& to CByteArray ? Pin
mmayur16-Feb-09 5:27
mmayur16-Feb-09 5:27 
AnswerRe: Convert const string& to CByteArray ? Pin
CPallini16-Feb-09 8:05
mveCPallini16-Feb-09 8:05 
GeneralRe: Convert const string& to CByteArray ? Pin
mmayur16-Feb-09 8:46
mmayur16-Feb-09 8:46 
GeneralRe: Convert const string& to CByteArray ? Pin
CPallini16-Feb-09 9:46
mveCPallini16-Feb-09 9:46 
GeneralRe: Convert const string& to CByteArray ? Pin
mmayur16-Feb-09 10:02
mmayur16-Feb-09 10:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.