|
the CLR (Common Language Runtime) means that code can be written in one language and called in another.
As far as i know, this is limited to being able to interchange DLL functions / classes.
|
|
|
|
|
There are many IPC (inter process communication) options including (but not limited to) COM, RPC, shared memory. etc. I'd go for the COM approach.
Steve
|
|
|
|
|
|
Hi !!
I have DLL in my application.It is working properly in Debug mode but not in Release mode.I found the problem with CString and I had clear all those CString problems.But when i directly ru the application in release mode it shows the Application Error.I click cancel to Debug (i release mode only), it gives "Unhandled Exception".When i debugging the application (in Releasemode), i didn't get any application errors.
|
|
|
|
|
|
|
Check for uninitialized variables, especially pointers.
In debug mode, they get initialized to zero/NULL (by the debug memory handlers).
In Release, they doesn't get initialized, unless you do it yourself.
|
|
|
|
|
In addition to others I would recommend you to enter in the
Release <br />
<br /> directory of your project, delete all files inside and then Rebuild your
project.
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
Check that you have used an absolute filepath to find the DLL
|
|
|
|
|
Here is my "Debug works, Release crashes" checklist:
-check for uninitialized variables, esp pointers.
-check build settings that only release mode libraries used
-look for ASSERT's with non-const expressions - use VERIFY here instead
-in MFC, look for mismatched message handlers, esp for OCX's.
|
|
|
|
|
Hi all
Please tell me how to temrinate an EXE which was created from the VC++ application using "ShellExecute".
To use TerminateProcess(), we should pass the handle of the process. But i how can i obtain the handle when i use "ShellExecute"?
and also In CreateProcess() function i don't find any parameter for "passing the parameter to the application to be invoked".
Bye
|
|
|
|
|
S.R.Sasi Kumar wrote: But i how can i obtain the handle when i use "ShellExecute"?
You can't. Use ShellExecuteEx or, much better, CreateProcess to retrieve the handle.
From MSDN:
BOOL CreateProcess(
LPCTSTR lpApplicationName,
LPTSTR lpCommandLine,
LPSECURITY_ATTRIBUTES lpProcessAttributes,
LPSECURITY_ATTRIBUTES lpThreadAttributes,
BOOL bInheritHandles,
DWORD dwCreationFlags,
LPVOID lpEnvironment,
LPCTSTR lpCurrentDirectory,
LPSTARTUPINFO lpStartupInfo,
LPPROCESS_INFORMATION lpProcessInformation
);
So what you are looking for is probably here lpCOmmandLine
~RaGE();
|
|
|
|
|
Rage wrote: So what you are looking for is probably here lpCOmmandLine
I think you mean lpProcessInformation.hProcess .
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Actually not, with this I was answering his second question "How to pass parameter to the invoked thing".
I agree I should have stated this more clearly.
This is not the first time you have corrected me these days, I should really pay more attention to my answers
~RaGE();
|
|
|
|
|
Rage wrote: Actually not, with this I was answering his second question "How to pass parameter to the invoked thing".
Fair enough.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
|
gd' morning everyone (yup, i'm still wakin' up),
i have a problem in my wish to move every GUI Strings of my project[^] into the resource strings table.
i can easily construct the caption on the propertySheet dialog using this->SetTitle() in my propertySheet constructor.
my need comes when i try to initialize each PropertyPage's caption (which end up as a tab) using this->SetWindowText() within CMyPropertyPage::OnInitDialog() , the tabs remains empty...
when i debug, the CString is correctly loading the resource string from the string table, so i think that it is the call to SetWindowText which is not appropriate. moreover, the breakpoint in oninitdialog is reached only when i navigate through the tabs (not at the first diplaying of the prop sheet...
however, i cannot find the messages sent when a propertySheet is initializing its pages...
any one can help please ?
thanks in advance
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
Hi tox,
you must set the title of the property page before you come into the OnInitDialog(), e.g. on property sheet level, just before adding the page.
That way:
CPage5Dlg page5;
page5.m_psp.dwFlags |= PSP_USETITLE;
page5.m_psp.pszTitle = "Environment";
~RaGE();
-- modified at 6:04 Wednesday 1st February, 2006
|
|
|
|
|
Rage wrote: you must set the title of the property page before you come into the OnInitDialog(),
yeah, i was thinking of something like this, but couldn't find out how...
Rage wrote: That way:
thank you... i'll try that this evening. you'll have feedback about it of tomorrow
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
If you want to change the tab's text after the page is created, use CPropertySheet::GetTabControl() and then CTabCtrl::SetItem().
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
|
well, guess what...
it does work, but partially
i explain:
when i do the following, it works :
this->FunctionsPage.m_psp.dwFlags |= PSP_USETITLE;
FunctionsPage.m_psp.pszTitle = "Environment";
but this doesn't :
this->FunctionsPage.m_psp.dwFlags |= PSP_USETITLE;
CString strCaption;
strCaption.LoadString(IDS_HELP_FUNCTIONS);
FunctionsPage.m_psp.pszTitle = strCaption;
while debugging, the strCaption variable is correctly filled with the right resource string, but the variable might be destroyed when living the scope.
actually, it works only if i hard code the string to display (which is exactly what i don't want)...
any idea ?
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
Two ideas :
1. Try with
FunctionsPage.m_psp.pszTitle = strCaption.operator LPCTSTR();
2. Try with
strcpy(FunctionsPage.m_psp.pszTitle,strCaption.operator LPCTSTR());
Actually, as its name suggests, pszTitle is not a CString , so I presume you are right when saying the variable is destroyed after leaving the scope (In fact, you do a pointer assignment and the pointer is destroyed after leaving the scope).
If I am right, solution 1 will not even compile. So I bet solution 2 is what you are looking for.
~RaGE();
-- modified at 5:25 Thursday 2nd February, 2006
|
|
|
|
|
already done both.
let me add one note to your reply code however.
cast operators overloads are designed to be used as C-Style cast.
so instead of calling strCaption.operator LPCTSTR() , simply call (LPCTSTR)strCaption
anyway, this doesn't work either...
solution 1 actually compiles, but the tab caption displays strange characters (significative to our first diagnostic).
solution 2 doesn't compile ; the compiler says that it cannot convert parameter 1 from const char* to char* (and here, i don't understand why... )
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
Hi,
I'd like to write a function, which returns an array of strings. But the size of the array is unknown. For example, it has to create a string array with the nos. I enter (say, "1", "2", "4", "9".. , and return back to the caller function when I enter 0. It has to grow dynamically. But I don't want to do it with built-in classes like list, vector and so on.
I'd like to use 'new' operator or 'malloc/realloc' functions.
Pls suggest me a good solution.
Thanks in advance,
Sarvan AL
|
|
|
|