|
WOW...
According to dependency walker, it requires the following...
kernel32.dll, user32.dll, gdi32.dll, comdlg32.dll, winspool.drv, advapi32.dll, shell32.dll, comctl32.dll, ole32.dll, olepro32.dll, oleaut32.dll at the first level
Then each of them has a list!
Is it necessary to include all these in an install utility?
Does one of these look like a good candidate for something that's not typically loaded in a Win2000 installation?
Thanks!
|
|
|
|
|
Hello,
I was wondering if it was possible to pass variables from Macromedia Director into a C++ programme? It can be done rather easily using Flash (from the look of things) but I need to be able to do it in Director. I have searched the web and very little is mentioned. Any help would be greatly appreciated.
Regards,
Moo
|
|
|
|
|
Any one have any ideas about it?
|
|
|
|
|
Hello,
I'm debugging my last program... and today I've acquired Rational Purify (trial version) in order to receive help on this task...
after running my program under Rational Purify, I've found some memory leaks... but now I'm not sure of which is my name (almost)...
let's see, it says that this code is leaking memory:
-------------------------------------------------------------
-------------------------------------------------------------
// Variables que permeten la construcció del codi HTML.
CString csCodiHTML = "HTML STRING...";
BSTR bstr;
int iWidthAreaClientHTMLCtrl = 0;
// Tractament del SafeArray.
HRESULT hrTractarAmbSafeArray = S_OK;
SAFEARRAY *pSafeArray = NULL;
VARIANT *pElement = NULL;
extern CTCCApp TCCApp;
//------------------------------------------------
// Obtenir accés al control HTML via ATL.
//------------------------------------------------
CComQIPtr<IHTMLDocument2> spHTMLDocument = this->m_HTMLCtrl.GetHtmlDocument();
if(spHTMLDocument)
{
CComQIPtr<IHTMLElement> spHTML;
spHTMLDocument->get_body(&spHTML);
if (spHTML)
{
bstr = csCodiHTML.AllocSysString();
spHTML->put_innerHTML(bstr);
spHTML.Release();
SysFreeString(bstr);
csCodiHTML.ReleaseBuffer();
csCodiHTML.FreeExtra();
}
else
{
pSafeArray = ::SafeArrayCreateVector(VT_VARIANT, 0, 1);
if (pSafeArray)
{
hrTractarAmbSafeArray = ::SafeArrayAccessData(pSafeArray,(LPVOID*) &pElement);
pElement->vt = VT_BSTR; // HERE!
pElement->bstrVal = csCodiHTML.AllocSysString();
hrTractarAmbSafeArray = ::SafeArrayUnaccessData(pSafeArray);
hrTractarAmbSafeArray = spHTMLDocument->write(pSafeArray);
::SafeArrayDestroy(pSafeArray);
csCodiHTML.ReleaseBuffer(); // HERE TOO!
csCodiHTML.FreeExtra();
}
}
}
if (spHTMLDocument) spHTMLDocument.Release();
-------------------------------------------------------------
-------------------------------------------------------------
Where you can see HERE! and HERE TOO! is where that program Rational purify is detecting some memory leaks... do you think that the code is leaking memory?
and if so... why? I thought that if I have not called new I should'nt call delete and that whenever the function goes out of scope the local variables are destructed automatically... isn't it true?
Thank you in advance...
|
|
|
|
|
You are missing a call to SafeArrayUnaccessData.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
"Resource acquisition is initialization"
I love it.
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
|
Actually, it is in the code. I must have missed it first time around.
*shrug*
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I don't think there are leaks in your code.
It could be that the complaint is about the line below //HERE, as your tool has no way of knowing that SafeArrayDestroy() will delete the BSTRs in the array.
Also, in my opinion, your calls to ReleaseBuffer() and FreeExtra() are not necessary.
Cheers,
Rob.
|
|
|
|
|
hi, I need some advice about using and connecting the CBaseControlWindow into the IGraphBuilder interface.thnx
J.
|
|
|
|
|
Does anybody know of a good way to convert a bitmap to jpeg.
At the moment i'am wrinting a small application that creates BITMAPS but i actually need to convert them to jpeg?
What is the best or esiest way to do so?
|
|
|
|
|
|
I have a Rect say (0, 16, 0, 154) and i want to print it out with that same rect on a printer.
on the printer dc i say
int nOldMapMode = dc.SetMapMode(MM_HIENGLISH);
dc.DPtoLP(rect);
it converts it to (0, -27, 0, 257) wich is way to small for the printer.
How do i convert this rect to the same rect for a printer?
Scott
|
|
|
|
|
HDC hdcPrinter;
CPrintDialog dlg(FALSE);
CDC dcScreen;
HDC hdcScreen = ::GetDC(NULL);
dcScreen.Attach(hdcScreen);
if (dlg.DoModal() == IDOK)
{
hdcPrinter=dlg.GetPrinterDC();
long logicalPixelsPerInchX_Screen = GetDeviceCaps(hdcScreen, LOGPIXELSX);
long logicalPixelsPerInchY_Screen = GetDeviceCaps(hdcScreen, LOGPIXELSY);
long logicalPixelsPerInchX_Printer = GetDeviceCaps(hdcPrinter, LOGPIXELSX);
long logicalPixelsPerInchY_Printer = GetDeviceCaps(hdcPrinter, LOGPIXELSY);
}
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
ok i have the pixals per inch, what do i do with them to convert the rect?
|
|
|
|
|
Hi :
I'm a VC++ beginner and i have a problem with stand alone (.EXE) MFC application!!
Whenever that i want to run a .EXE file written with mfc in other machine i recieve the
following error for example :
The MFC42D.DLL not found....and etc.
Now i want to know what files(.DLL or ...) are needed for running a MFC program.
Please Help Me.
My english isn't very well because it isn't my native language,excuse me for bad
comments.
|
|
|
|
|
You need to compile your app in Release mode, not debug. You can watch the file dependencies with "Dependency Walker"
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi guys
I've discovered that my problems about GDI resources are due to use a class designed for NT or w2000 working in w98.
How could I discover what calls are exclusive for w2000?
The class is a CStatic derived class that works like a 2 states button, changing the bitmap from one to another depending the state.
I don't know if this info is enough for you.
Best Regards
Dr. pi
|
|
|
|
|
doctorpi wrote:
How could I discover what calls are exclusive for w2000?
By reading the documentation?
|
|
|
|
|
I don't know how to progamme an application without tittle bar,menu bar, toolbar, status bar... such as many games we have been seen. Please help me.
(I'm sorry! My English is not good.)
|
|
|
|
|
What you want is a Dialog based application. The default is:
1) No menu bar
2) No toolbar
3) No status bar
To get rid if the title bar go to the dialog properties and and clear the title bar option.
Art
|
|
|
|
|
Hello,
I have a dialog window based on CPropertySheet and I've added 2 CPropertyPages.
I have 2 questions:
1) The constructor gives me also an apply button, but I can't find a way to get rid of it. I don't need it.
2) On my CPropertyPages I also have a default button. If I press <enter> the dialog closes instead of doing the functionality behind my page default button.
I tried to override the OnOk on my Page, this shows my test message, so it is executed, but still the dialog closes. Any ideas how to override the CPropertySheet dialog default button so my CPropertyPage default button is executed, and nothing else?
Thanks
Wim
|
|
|
|
|
1) here is some code that builds a property sheet and gets rid of apply
CPropertySheet CompSheet("Company Information");
CCompBasic page1(pComp, TRUE);
CCompAddr page2(pComp);
CCompBank page3(pComp);
CCompDiscountMaint page4(pComp);
CompSheet.AddPage(&page1);
CompSheet.AddPage(&page2);
CompSheet.AddPage(&page3);
CompSheet.AddPage(&page4);
CompSheet.m_psh.dwFlags |= PSH_NOAPPLYNOW;
2)in your dialog's onok you are probably still calling onok which is passed to the sheet.. at least thats my initial guess..
CMyDialog::OnOK()
{
AfxMessageBox("woop!");
} i may be way off on the 2nd one.. but the 1st will work..
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
Hello,
Thanks.
The first part removed the apply button.
The default button behaviour is still there am afraid.
I dont't have any default calls in my overrided functions, stil he just act like if the OK button was pressed.
I will have to explore the caves of CPropertySheet I suppose.
|
|
|
|
|
Looks like I first had to dig in the codeproject articles :
This[^] article shows in detail how to do it...
|
|
|
|