|
sorry
res is an initialised Globel MYSQL_RES *res;
|
|
|
|
|
MsmVc wrote: res is an initialised Globel MYSQL_RES *res;
The results will still be the same, won't it be? I do not know if the method that accepts that particular pointer will do a write operation to it, or probably call some method on it if it's a class object.
Either ways, how do you expect an uninitialised pointer to work? Try creating the variable on the stack and use it instead.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
sir
my code is working fine when table rows is less than 229000.I am getting error when table rows is more than 229000.
So there is no need to discusses about res is an initialised or uninitialised.Matter is why
mysql_fetch_field(res1); generating exception if table rows is more than 229000.
Plz help me
|
|
|
|
|
did you try to use mysql_use_result() rather than mysql_store_result()?
do you know the difference of the 2 functions? why do not try it?
|
|
|
|
|
when i use mysql_use_result() then i am getting exception on line
field1=mysql_fetch_field(res1);
0xC0000005: Access violation reading location 0x00000040.
|
|
|
|
|
i created one dialog based application. In that Dlg App class i am calling RegisterShellFileTypes(), in CWInApp::initInstace.
But application is crashing due to no poniter to document class.
code is like this :
CDesktopWallpaperDlg dlg;
m_pMainWnd = &dlg;
EnableShellOpen();
RegisterShellFileTypes();
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
so, can anyone tell me what is the problem exactly?
it working with SDI Application..
Regards,
Srinivas
modified on Thursday, December 3, 2009 6:24 AM
|
|
|
|
|
The problem is precisely what the error message says. RegisterShellFileTypes creates registry entries to associate a document type and file extension with an .exe. If you aren't using the MFC DocView framework, there is no document class and the function call fails.
You can make the same registry entries manually; just because you aren't using the DocView framework doesn't mean you can't associate a file extension with an app, it just takes a bit more code.
|
|
|
|
|
when i call this RegisterShellFileTypes() in App Class,
internally in this function defination having pointer of document class.
but dlg based application doesn't have doc class. so that,
pointer is becoming NULL.
void CWinApp::RegisterShellFileTypes(BOOL bCompat)
{
ASSERT(m_pDocManager != NULL);
m_pDocManager->RegisterShellFileTypes(bCompat);
}
but,it is working fine with SDI Application.
i have tried in one sample SDI application.
Regards,
Srinivas
|
|
|
|
|
Yeah.... and what does SDI stand for? 'Single Document Interface'. It works in an SDI app because the SDI app has a document class, and fails in your dialog app because it doesn't have a document class.
|
|
|
|
|
I know what is the SDI stand for..
what iam asking that, how to do in dialog based.
i created one reg file. but
what should be write in reg file instead of document class does.
Regards,
Srinivas
|
|
|
|
|
It seems RegisterShellFileTypes() is to be used with SDI or MDI apps only.
|
|
|
|
|
what dll is relayed to the compile error?
|
|
|
|
|
The one that's missing from your project, i.e maybe IWshRuntimeLibrary!
|
|
|
|
|
IWshRuntimeLibrary works fine.
|
|
|
|
|
includeh10 wrote: IWshRuntimeLibrary works fine.
So are you saying that the title of this message "unresolved external symbol public: long __thiscall IWshRuntimeLibrary::IWshShortcut::Save(void)" has been fixed?
|
|
|
|
|
no,
IWshRuntimeLibrary::IWshShellPtr raw_CreateShortcut() works fine before the missed link LNK2001.
I think I need to import some dll file, but I don't know which one.
|
|
|
|
|
I have looked at MSDN but cannot find a direct reference to this library. I can only suggest you go back to your documentation and recheck the format of the Save() command.
|
|
|
|
|
Hi i m working in MFC dialog based application i want to resize the window according to screen resolution ( i m using win XP)
so that the application must be maximized
and the controls be resized accordingly on initialization
plz guide
uzmeed
|
|
|
|
|
I think you can use GetSystemMetrics() to get screen size and use SetWindoPos() API to change the size of your dialogbox.
|
|
|
|
|
HI
thanks for ur answer but the controls in the dialog box are not resizing accordingly (like edit box, buttons )
i hope i will get the solution also
uzmeed
|
|
|
|
|
I suggest you take a look at this section on CP[^]. It contains some classes that helps you positioning the controls of a window when it is resized.
|
|
|
|
|
|
uzmeed wrote:
so that the application must be maximized
Isn't this just a matter of calling ShowWindow(SW_MAXIMIZE) ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
HI all,
I m working on SDI type application.
i have an image stip,in my application i have many dialogs and formview all are of diffrent size.
i want to use image strip as a dialog or form banner.
so i want to stretch it horizontally according to dialog or form size.
please tell me how can i do this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
How are you drawing the image and which control are you using?
The StretchBlt function can stretch an image.
|
|
|
|