|
I have them both installed on my machine. Each one is using their own MSDN collection. The only problem is that VS.NET becomes the default program that opens the .cpp, .h, .dsw, .dsp etc., so you may consider being careful when double-clicking one of them.
Best regards,
Alexandru Savescu
|
|
|
|
|
Right-click the file and choose "Open MSDEV"
Concussus surgo.
When struck I rise.
|
|
|
|
|
hello,
I am looking for a way to convert a double to the char representation.
e.g. double x=12.3456
char y[10];
|
|
|
|
|
|
See CString::Format() or sprintf() .
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thx you very much!!!
|
|
|
|
|
Hi,
I am able to install an Icon ShortCut with my application! But I discover that: not all Desktop of every PC is located at the same place (ie: c:\Windows\Desktop)!
Therefore if the application at Run Time can not know where the Desktop location in-advance, then it can not install the Icon ShortCut at the right place!
Except we have to search for that (Desktop location of that PC), is there any simple way to install the Icon ShortCut without searching? Or with seraching is there any simple codes to do that?
I appreciate a lot if someone help me here.
|
|
|
|
|
See SHGetSpecialFolderLocation() . On Win2K, use SHGetFolderLocation() instead.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi,
Thanks for your advices, I will try to use it! But I would like to know a bit more:
In one PC, there might be more than one user to use ... in this case, how can we know which Desktop is ON, in order to install Icon ShortCut at the right place?
Many thanks & regards,
Anh Truong
|
|
|
|
|
Hi Anh,
Try CSIDL_DESKTOPDIRECTORY and CSIDL_COMMON_DESKTOPDIRECTORY as CSIDLs.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I want to ask how to make the child frame maximize and non-resizing?
Thx you very much ^_^
|
|
|
|
|
I haven't been able to find a MFC book I like. "Teach Yourself Visual Studio .NET in 21 Days" seems to assume that I am new to C++ and only want to modify code without understanding it. "Introduction to MFC Programming with Visual C++" covers the fundamentals first, but the first half dozen examples in the book do not complie as written!
So I have decided just to use the MSDN Libaray to understand the fundamentals then I will read Teach Yourself book when I am able to read and understand the code the Wizards Generate.
I already have a firm grasp of the Win 32 API and am proficent at C++.
Unfortunately there is a lot of information and it seems I would have to already know MFC to determine the best strategy for learning MFC.
I would appreciate any advice on what sections/topics to cover and in what order.
Thanks.
|
|
|
|
|
Jeff Prosise's book "Programming Windows using MFC" is a worthy read for those who know the Win32 API and C++. I expect you'll be able to breeze thru the book pretty quickly. Imho, it's a lot better than the "Learn mumble in n time units" books.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I'd start with Scribble tutorial. It demonstrates most important MFC concepts quite nicely.
Tomasz Sowinski -- http://www.shooltz.com
Never argue with an idiot, he'll bring you to his level and beat you with experience.
|
|
|
|
|
On WinNT/2K/XP, how do determine what privilege
level a process is executing in (eg whether
the process has LocalSystem privileges)? Is
there any API call to use?
|
|
|
|
|
Look for OpenProcessToken and GetTokenInformation
|
|
|
|
|
Does the process calling these functions require any special access rights? My application can only execute with normal user privileges.
|
|
|
|
|
the calling process needs the SE_DEBUG_NAME privilege,that can be achieve using AdjustTokenPrivileges
|
|
|
|
|
A usual user account should never have assigned SeDebugPrivilege. This is one of the most powerful privileges and can easily be used to make yourself an Admin!
UGenn, what exactly do you want to do? Do you try to get this informations about a foreign process or about your own process? And what information do you need? "Privilege level" is a bit ambigious, because the access rights of a process are spread over a couple of places. Do you just want to know if the process is running under the LocalSystem account? Or if the user account the process is running under is a member of the Admins group? Anything about assigned and enabled privileges?
I am quite sure I can help you, but I need more input
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
Hi,
Is it possible to use MSDN from Microsoft Visual Studio .NET with Microsoft Visual C++ 6.0? How to install it?
|
|
|
|
|
No. You need MSDN October 2001 or earlier to work with VC6.
From Jan 2002, MSDN only integrates with VS.NET
Michael
Time flies like an arrow. Fruit flies like a banana
|
|
|
|
|
Hi!
I've got a very strange problem:
When unloading my DLL from my EXE using FreeLibrary(hDLL) I get a debug assertion:
File: dbgheap.c
Line: 1011
Expression: _CrtIsValidHeapPointer(pUserData)
What the hell does that mean? Neither my DLL nor my EXE do allocate memory using new . The only thing my DLL does is getting the contents of a database that is within the DLL as a resource. But the MSDN says that it's not necessary to free the resource on Win32 platforms.
In the Release version of my DLL nothing strange happens, everything works fine.
So why do I get this debug assertion?
thanks in advance
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Ok I found the mistake, but still have one question:
This is the code that allocates some memory:
GeoIP *gi = (GeoIP *)malloc(sizeof(GeoIP));
gi->cache = (unsigned char*)malloc(sizeof(char) * dat_size);
if (gi->cache != NULL)
gi->cache = (unsigned char*)rc_dat;
else
gi->cache = NULL;
This allocates memory for the contents of the db from the resource.
In the DLL_PROCESS_DETACH I call this code:
if(gi != NULL)
free(gi);
When I comment out the code above I don't get the assertion, but if not, the debug assertion occurs. It seems like gi->cache points to a non-null memory but free() still can't free the memory
Do I still need to free the gi->cache structure?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
gi->cache isn't pointing at anything. in the first code sample, you allocated memory, then threw away the pointer when you set gi->cache to NULL or to rc_dat.
yes, you still need to free the memory, but you need to have the address of the memory before you can free it
-c
"To announce that there must be no criticism of the president, or that we are to stand by the president right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public."
-- Theodore Roosevelt
|
|
|
|
|
I do not understand this part.
GeoIP *gi = (GeoIP *)malloc(sizeof(GeoIP));<br />
gi->cache = (unsigned char*)malloc(sizeof(char) * dat_size);<br />
if (gi->cache != NULL) <br />
gi->cache = (unsigned char*)rc_dat;<br />
else <br />
gi->cache = NULL;
You allocate some memory and then you loose the pointer because you modify the pointer gi->cache. gi->cache now points to a different location and you cannot delete it if it is not on the heap. Also, you will surely have a memory leak; because you lost the pointer for the newly allocated memory space.
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
<nobr>They say I'm lazy but it takes all my time
|
|
|
|