|
good luck but why I am still facing the same problem
Trioum
|
|
|
|
|
No code, no help: Sorry I have my CPMRU (C ode P roject M ind R eader U nit) out of order today.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
trioum wrote: I defined the function in dll as follows
How is it declared in your exe ? Because that's just the part in the dll. Is it in the same file with precompiled directives (#ifdef...)
How do you load the dll ? Is it using LoadLibrary/GetProcAddress or linking to a static library ?
You need to provide more information if you want a solution.
|
|
|
|
|
I am linking to a static library and I defined it in exe as follows
extern "C" __declspec(dllexport) int Adddata(void* item);
Trioum
|
|
|
|
|
trioum wrote: extern "C" __declspec(dllexport) int Adddata(void* item);
No, that's in the dll: you have dllexport, you should have a dllimport for the exe. Where is this line of code ? In which file ? Show the code of this header file.
Did you make a search on google about calling conventions ?
Sorry, but if you are so sparse about giving informations, there's no way for us to help you.
|
|
|
|
|
sorry sir I typed wrong due to hurry it is dllimport i.e.
extern "C" __declspec(dllimport) int Adddata(void* item);
Trioum
|
|
|
|
|
now I tested another function that is working fine but not previous one
the new function as follows
defined in dll as
extern "C" __declspec(dllexport) int testfunction();
dllmain()
{
}
int testfunction()
{
return 2;
}
in my .exe it is as follows
extern "C" __declspec(dllimport) int testfunction();
onButtonclick()
{
int rvalue = testfunction();
//above code return rvalue is 2 and no error
}
Adddata(void* item); still firing same debug error
Trioum
|
|
|
|
|
That's normal: you don't pass any arguments to the function, so there's no cleaning of the stack for the arguments. So, calling convention has no effect here.
Try something: comment everything that is inside the Adddata function (in your dll). If you don't have the crash, then it probably means that you have a bug in your function.
|
|
|
|
|
trioum wrote: how can I solve it.
At a minimum, you could Google for (parts of) the error message.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi, i need your help
I want to use MapWinGIS (http://www.mapwindow.org/mapwingis.php) in my MFC application. (dialog box)
So I add in my project a Windows form where i develop the MapWingis.
(public __gc class libControl : public System::Windows::Forms::Form .... )
...
I succeed to open the windowform with a button, but I want the windowsForm is encrusted in my dialog box. Like it is a simple static.
Do you know how I can do that?
how can Integrate Windows Forms Into my MFC Applications... like that http://www.codeguru.com/cpp/cpp/cpp_managed/interop/print.php/c14589[^]
Thanks
|
|
|
|
|
Is this a Managed C++ question?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Managed C++ and MFC question... i don't know exactly where can i ask the question.
i want know how can i use managed code in an unmanaged code.
how integrate a WindowsForm like a simple control in my dialog box.
|
|
|
|
|
ellipsev2 wrote: i don't know exactly where can i ask the question.
Is this not the right forum?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
ellipsev2 wrote: how integrate a WindowsForm like a simple control in my dialog box.
Always check out the articles here on CodeProject [^]when you have a general question like that
led mike
|
|
|
|
|
yes led mike, it's ok for a simple WinForm control, but i want integrate a Form
I will see what you says DavidCrow, sorry fot the mistake
|
|
|
|
|
Is it possible to add a user defined button inside a AfxMessageBox??
Like the message box should display 2 buttons - a 'OK' and 'ADD' button. When the user cliks ADD it should call some userdefined function.
Priya Sundar
|
|
|
|
|
AfxMessageBox is just a wrapper around the MessageBox function. If you look at that, then there is no parameter for changing button names.
There is a new SDK function in Vista for simple message boxes, something like promptbox, but I'm too lazy to search, and it would be vista only.
There's nothing stopping you writing your own dialog with a bit of text and buttons - and with the text in a resource, it would be more internationalisable at a later date anyway.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
|
Hi,
I would like to be able to select the content of one or more cells
with the mouse, and with Ctrl+C (or other ways) copy te content of
the cells selecteds.
But I dont know how I can to do it . Is possible?
thank you very much
|
|
|
|
|
You need to give more information in your question.
To copy a cell, you need a petri dish. You could train a small mouse to move the dish about with its nose - but using a pipette is not really reasonable to expect.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
What is the cell you're talking about?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Excel cell
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Can you explain about cells we cant see that table.
|
|
|
|
|
Hamid. wrote: Can you explain about cells we cant see that table.
Humm . hide them
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
igor38 wrote: I would like to be able to select the content of one or more cells...
You are making an assumption that we know what in the world you are talking about. Read this first.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|