|
|
Hai,
I am trying to compile my application in VC++, I am getting error "file not found: ..\lib\ScriptHost.tlb". That file is not available in my machine. how to get that file? That file is included in the file
"..\Rogue Wave\Stingray Studio 2006\Include\toolkit\ActvHost\ScriptHost.rc"
Can anyone suggest me what I could do for this
Thanks
Surendran
|
|
|
|
|
Some type library was referenced with the #import directive. Probably, the type library contained a reference to another type library that was not referenced with the #import directive. This other .tlb file was not found by your compiler.
Why don't you contact Rogue Wave Software. You can find their contact website here[^]
SkyWalker
|
|
|
|
|
Im getting this exception
First-chance exception in abc.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
I want to get rid of this exception totally. I hav tried hard to solve but in vain.... Can any one help......
|
|
|
|
|
A first chance exception is just for debuggers. When an exception is generated and being debugged the handling is two stage. In the first stage, known as the “first chance”, the debugger is notified about the exception and can control further processing. The second stage refers to the normal exception processing mechanism. You’ve got some C++ code which throw s an exception somewhere and it’s probably normal. To find where it’s coming from set your debugger to break on the first chance for the exception type in question.
Steve
|
|
|
|
|
Stephen Hewitt wrote: find where it’s coming from set your debugger to break on the first chance for the exception type in question
How can this be done?
Thank you in advance.
|
|
|
|
|
What debugger do you use?
Steve
|
|
|
|
|
|
When debugging an application select “Debug”->”Exceptions...”. The “Exceptions” dialog will appear. Select the exception type in the list and press the “Stop always” button then press "OK". When the exception is generated your debugger will break and you can view the call stack ("View"->"Debug Windows"->"Call Stack"). Remember to change things back when you’re done.
Steve
|
|
|
|
|
You can do some things:
- To aisle the code that makes that exception and try to solve it (I think that you've already tried that).
- To use TRY/CATCH (exception handling) in order to help you to find where it came from or to handle strange situations.
Also there is a nice feature in VC++6 (I'm still using that one) that I suppose that will also be in the newer IDE's: you can go back from the point in which the problem has raised using a combobox named context (it appears in the top of the listboxes that allow you to debug).
Hope this helps...
|
|
|
|
|
In the continue with Steve see this[^] if its helpfuls
|
|
|
|
|
HI Experts
How can i handle the return value of this function
inline iRDOStoresPtr IRDOSession::GetStores ( )
{
struct iRDOStores * _result = 0;
HRESULT _hr = get_Stores(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return iRDOStoresPtr(_result, false);
}
manu
|
|
|
|
|
Try this
iRDOStoresPtr pRDOStores = IRDOSession::GetStores()
but replace the "IRDOSession::" bit the name of your variable that represents the IRDOSession class/structure, e.g.
iRDOStoresPtr pRDOStores = mySessions.GetStores()
|
|
|
|
|
Dear all,
Anybody knows from where AfxWinMain gets the CWinApp global object pointer ?
When i looked the MFC source file (winmain.cpp) i can see the following lines.
nt AFXAPI AfxWinMain(..../*params*/)
{
int nReturnCode = -1;
CWinThread* pThread = AfxGetThread();
CWinApp* pApp = AfxGetApp();
}
Surely AfxGetApp() returns that global object. me again looked the AfxGetApp function , it is calling a AfxGetModuleState state function and this function returns the CWinApp object. AfxGetModuleState gets this value from CThreadLocal class's object.
My question is How MFC getting the pointer of my CWinApp derived class object.
Share your ideas please..
-- modified at 0:51 Friday 5th January, 2007
If u can Dream... U can do it
|
|
|
|
|
The following line is from CWinApp::CWinApp :
pModuleState->m_pCurrentWinApp = this;
That's how it gets the app.
Steve
|
|
|
|
|
Thanks Steve. .
If u can Dream... U can do it
|
|
|
|
|
I'm trying to add a new string value to HKEY_LOCAL_MACHINE Software\\Microsoft\\Windows\\CurrentVersion\\run\\. I'm trying to give users a choice if they want to have the program start up with computer. I'm having some difficulty programming this with C++. Im using VC 7.1 on a windows XP. Ps. Using console. Any help would be greatly appreciated. Thanks in advance.
|
|
|
|
|
You have a problem but what?
|
|
|
|
|
would it be possible for somebody to give me an example on how I would do this kind of registry editing?
|
|
|
|
|
|
arbster wrote: I'm having some difficulty programming this with C++. Im using VC 7.1 on a windows XP
What difficulty you are facing ?
|
|
|
|
|
to be honest i know what the functions exist but I'm having trouble implementing them. An example would help greatly.
|
|
|
|
|
arbster wrote: An example would help greatly.
This example would create a key named "arbster" under HKLM->System in the registry.
HKEY hKey;
DWORD dwMyVal;
if ( RegCreateKeyEx(HKEY_LOCAL_MACHINE,
_T("SYSTEM\\arbster"), 0, NULL,
REG_OPTION_NON_VOLATILE, KEY_WRITE,
NULL, &hKey, &dwMyVal) == ERROR_SUCCESS )
{
AfxMessageBox(_T("Key created successfully"));
}
else
AfxMessageBox(_T("Unable to create key"));
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Use RegOpenKeyEx() and open the key and then use RegSetValueEx() to write into it. You may also want to look into the documentation for CRegKey.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
what if the key does not exist (im trying to add a key). Will RegOpenKeyEx() still work or will i have to use RegCreateKey() ?
|
|
|
|