|
VC6 (maybe VB6 too...) was terrible about losing track of information about your code.
Close it down, and use Task Manager to make sure the process goes away too. Then delete the ncb file for that workspace, and run VC6 again.
It will regenerate the classes on the left pane, and hopefully also the same information is used for mousing over things.
Iain.
|
|
|
|
|
Thanks for your answer it worked
|
|
|
|
|
LPDEVMODE CPrintDialog::GetDevMode() const
{
if (m_pd.hDevMode == NULL)
return NULL;
return (LPDEVMODE)::GlobalLock(m_pd.hDevMode);
}
I search in dlgprnt.cpp, no ::GlobalUnlock(m_pd.hDevMode) .
system
|
|
|
|
|
MSDN:For movable memory objects, GlobalLock increments the count by one, and the GlobalUnlock function decrements the count by one. For each call that a process makes to GlobalLock for an object, it must eventually call GlobalUnlock.
Did you check that you link to kernel32.lib and have windows.h included?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
If I need to free the resource, I have to call ::GlobalUnlock(m_pd.hDevMode) .
I seems not so good.
And I tried not to free it, no memory leak.
I don't know which way is ok.
system
|
|
|
|
|
HI,everyone.
I have used the stream I/0 to write myOwn.exe file in the source.exe file.When the combined file is executed,it can read myOwn.exe out and create two processes to execute them(This procedure is achieved in myOwn.exe).But I think this method is a little stupid.
Do you have any other great idea to combine them to a single,in which the two .exe files can be executed by turns?
modified on Wednesday, September 17, 2008 9:57 PM
|
|
|
|
|
|
thanks a lot ,a good article.
You know some birds are not meant to be caged, their feathers are just too bright.
|
|
|
|
|
Occassionally my project crashes and displays a dialog box that says, "Unhandled Exception in mt.exe". What might be the cause of this problem?
This problem occurs not only in my current working project but in other VC++ projects also(when I tried to open those projects, I was unable to open those projects and I got a statement like, "Memory location could not be read"). When I restart my system things become normal. But the problem reoccurs suddenly. How to resolve this error?
|
|
|
|
|
The Mt.exe file is a tool that generates signed files and catalogs. It is available in the Microsoft Windows Software Development Kit (SDK)
T.RATHA KRISHNAN wrote: Occassionally my project crashes and displays a dialog box that says, "Unhandled Exception in mt.exe". What might be the cause of this problem?
May be something is triggering the crash. don't exactly know what
T.RATHA KRISHNAN wrote: his problem occurs not only in my current working project but in other VC++ projects also
may be your VS installation has gone corrupt. Try reinstalling it
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
1) Is there some way I can get a list of IDC_ control ids dynamically at run time to step through in a loop like the following
List idList = SomeFunction() // Get a list of control objects
for(int k = 0; k < idList.length(); k++)
{
GetDlgItem(k.id)->EnableWindow(false);
}
2) The other option I though of is that if all my IDC_ ids increment, I would only need to know the total number of items and I could do the following:
unsigned int cnt = SomeFunction(); // Get the total number of control objects
for(int k = 0; k < cnt; k++)
{
GetDlgItem(k)->EnableWindow(false);
}
thanks
|
|
|
|
|
Using EnumChildWindows or GetWindow() you can get all the child windows handle. Then you can call ::EnableWindow() with that handles.
|
|
|
|
|
Hi All
I have problem to copy File/Folder data.I have source and destination path name and i want to copySource file to destination file.I am useing these code..
CopyFileA("C:\\a.txt","D:\\a.txt",TRUE);
Plz help me
|
|
|
|
|
Please use GetLastError()[^] and find out what went wrong.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Thx's i found exception
a.exe: 0xC00000FD: Stack overflow.
Following exception occurred: -1073741571 -- File: e:a\delayeddirectorychangehandler.cpp Line: 229
And line is here..
TRACE(_T("Following exception occurred: %d -- File: %s Line: %d\n"), dwEx, _T(__FILE__), __LINE__);
I am useing directorywatcher and take example from codeproject.Lunk is here http://www.codeproject.com/KB/files/directorychangewatcher.aspx[^]
plz help me
|
|
|
|
|
Please follow Rajesh's advice and use GetLastError().
|
|
|
|
|
knowvc wrote: I have problem
Which is ? How can we help you if you don't provide enough information ?
Did you check that "a.txt" doesn't exist (you are passing TRUE for the bFailIfExists parameter) ?
knowvc wrote: CopyFileA
Why are you using the version specific to non-UNICODE builds ? You should use CopyFile instead.
|
|
|
|
|
Hello everyone,
When in the ATL wizard to create a coclass, we specify ProgID under COM category.
My questions,
1. I think the progid could be used by COM consumer/client to create COM object instance without using GUID/CoClass name, and just use progid. And progid is for each coclass level, not for interface or for COM server level. is that correct?
2. I am taking quite some time in MSDN and Google to find a simple sample of how to use progid to create coclass object. Could anyone refer some sample pleases?
3. Besides using progid to create a coclass, any other usages?
thanks in advance,
George
|
|
|
|
|
|
Thanks Sohail,
You have made a so great reply! Very comprehensive!
Two more questions,
1.
Normally how will COM comsumer know progid? From typelib file, IDL file or from some other means?
2.
Each progid is for each coclass type (e.g. suppose in my in-process server DLL, I defined 5 coclas types, then I should have 5 progids?), and progid is not for interface or in-process server DLL, correct?
regards,
George
|
|
|
|
|
1. Normally some information will be required by consumer of your COM server. So ProgId, ClassId, Interface descriptions etc need to be published. There are various ways for the consumer to instantiate and consume the services provided by the COM Server (one of which is using ProgId). If information from TypeLib is to be queried then you may use Type Description Interfaces and Functions[^]. There is also IProvideClassInfo[^] interface that helps accessing the type information for an object's coclass.
ProgId could be published in TypeLib files, Interface and coclass declaration (header) files or simply as part of your COM server documentation.
2. Yes. As mentioned by Larry Osterman in his blog entry (see the link I posted earlier) - "The PROGID provides the ability to define a string alias for a particular COM object. Thus with the PROGID, you can access a COM object without having to know it's CLSID. This can be quite handy, especially when you're working in languages that don't provide easy access to a GUID data type. A PROGID is simply a string representation of the class. "
Glad I could help.
PS: What registry entries are needed to register a COM object[^] is a good read.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Cool Sohail!
Two more comments,
1. Besides using progid to create a coclass by getting CLSID, any other usages?
2. Is it possible there are conflicting progid string? My concern is GUID generation algorithm is well-defined to avoid conflicting, but for progid, it is just string... Any comments?
regards,
George
|
|
|
|
|
1. No. ProgId simplifies the coclass instantiation. It's easier to remember ProgId "Excel.Applicatio" instead of it's equivalent UUID
2. Yes. I believe this link What is a ProgID and How Do I Change It?[^] might be helpful, if not, let me know.
PS: There are two term ProgId and VersionIndependetProgId
Cheers,
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Thanks Sohail! You are progid Guru!
Two more comments,
1.
I read the two links below. My question is they are dealing with how to deal with typelib, but I have not found explicit samples about how to extract progid from typelib from them. Do you have any samples?
http://msdn.microsoft.com/en-us/library/ms221172.aspx[^]
http://msdn.microsoft.com/en-us/library/ms687303(VS.85).aspx[^]
2.
The article you recommended above handles quite well about version issues, but my issue is not dealing with version of the same component -- but different components have the same progid name accidently, suppose I develop a component and name it monitor (progid), but I found there is already a component named monitor (progid), what should I do to solve this issue in an elegant way?
regards,
George
|
|
|
|
|
1. Sorry, no specific sample as of now See if this help -
Writing a simple Typelibrary browser [^]
Reading The Type-Library[^]
2. There are few rules about naming ProgIds (see <progid> Key[^])
The format of < progid > is < program >.< component >.< version > without spaces and < and >
It is possible that two different components may use same ProgId. But since the ProgId is constructed using three different entities, the chances of collision can be reduced. The choice of ProgId should be made keeping in mind that ProgId's may not be unique unlike GUIDs.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|