|
|
The last URL is for a Code Project article. Also the links provided by other CPians for your query have some good articles.
Let us know if you have any specific queries after reading the articles.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
|
Hi,
I have tried to use multilanguage support application. So i gave UNICODE in the project settings, then i got this error.
error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup
Then i gave WinMainCRTStartup in the Entry point. Still i am getting the same error..
Could any one solve this..
The price of anything is the amount of life you exchange for it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
santhoshv84 wrote: WinMainCRTStartup
It is wWinMainCRTStartup
|
|
|
|
|
How does one go about editing the master list of installed apps?
I've got an app I need to upgrade, yet due to a problem in it's installer, I cannot upgrade it. So, what I'd like to do is make the system think it was never there in the first place.
Any thoughts -- on how to remove a past installation from the list of installed programs?
Thanks in advance!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
|
Hi,
I'm trying to convert the following XML block into something (my RC compiler cannot digest this) and which thereafter mt can handle. It is largely the Microsoft UCA Code. Any chance of anyone compiling this and sending me back the Obj.
<pre><code><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="SgBackup"
type="win32"/>
<description>Softguard Utility Program</description>
<!-- Softguard Utility Program -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2>
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly></code></pre>
thanks, Bram.
Bram van Kampen
|
|
|
|
|
Did you know you don't need to compile this resource Bram? You can simply copy this text into a file and name it yourApplicationName.exe.manifest. Windows will automatically load this file if present - You can add XP themes to old programs in this way, as long as they have the CommonControls library linked in.
However, if you'd really like to avoid having an extra file floating around, here's the RC, XML & RES files:
'Compiled' Manifest[^]
|
|
|
|
|
Tanks, Sounds Interresting. why in that case do we have all this complicated stuff about manifests on MSDN, complete with a utility called 'mt.exe'. The procedure outlined on MSDN boils down to:-
>Insert App.exe.manifest in a resource file:
MANIFEST_RESOURCE_ID RT_MANIFEST MOVEABLE PURE "MyApp.exe.manifest"
>:Compile and Link,
>:run mt.exe with a specified command line.
It compiles without complaining, and the XML code ends up verbatim inside my exe.
When I run mt.exe I get:
Building Manifest...
Microsoft (R) Manifest Tool version 5.2.3790.2075
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
mt.exe : general error c101008c: Failed to read the manifest from the resource of file ".\Debug\MyApp.exe". The specified resource type cannot be found in the image file.
Error executing c:\windows\system32\cmd.exe.
Now, I observed that the resource is included in the exefile 'by name', and in Unicode (i.e.:RT_MANIFEST), and that the XML is in ascii, NOT Unicode.(even if I save the manifest in Unicode).
BTW, if it is sufficient to add this manifest as a standalone, what's the point in armour plated security if any user just can defeat it all, by writing (or downloading) a piece of XML Text.
Bram van Kampen
|
|
|
|
|
i am making setup of my vc++ 6.0 program but how can i find that to make setup which dll is require (i am using innosetup to make setup)
my prject also communicate with MS ACCESS so how can i provide this with setup if MS ACCESS is not install on client computer then my prgram will not run and which dll requires to run project if vc++ is not installed
how can i over come these problems?
|
|
|
|
|
Insted of looking for specific dlls (used by MS Access), better to read from the registry,the registry key values and find out whether MS Access is installed or not. If not installed, in that case it is advisable to install MS Access than copying a bunch of dlls & then running your application...
Regards,
Rane
|
|
|
|
|
Is there anyway I can protect a pointer from being deleted by a function, but at the same time allow the function to operate on the pointer?
In other words, I want to protect the pointer from accidentally being deleted by the consuming function.
|
|
|
|
|
How can a pointer accidentally be deleted?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I didnt mean 'accidentally deleted' in that way, what i meant was that, if i pass a pointer to a function, i dont want the function to take 'ownership' and delete it etc (due to bad programming on the function side, which i have no control of it). If I allocated the pointer, only i will have the ability to delete it. Other consuming functions can only process, read/write and not delete.
Can it be done?
|
|
|
|
|
uus831 wrote: Can it be done?
Not without control of the consuming function.
The caller wouldn't even know if the pointer
was deleted by the consumer.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I'm looking at smart pointers, auto pointers. Can it be used?
|
|
|
|
|
Short Answer: NO.
Longer Answer:
You seem to be used to VB. Welcome to 'C' One of the Advantages of 'C' and 'CPP' over the likes of Basic is, that you have access at your own discression to your own dicression to all actual bytes in memory. That means, Greater Access, but also No Secret Actions which change the world around you when you're not looking. This great power comes with the great responsibility of having to put into place your own system of checks and balances to ensure that you don't use a pointer after you delete it's contents. The Standard way of dealing with this is a programming discipline of setting a pointer to NULL when de-allocated, and of duplicating a pointer only under reserve.
This is a very big subject in terms of language definition, but quite simple if you get a picture in mind about how code is laid out.
Regards
Bram van Kampen
|
|
|
|
|
Thanks.. I get the picture now. There is simply no way.. Have to trust the programmer
|
|
|
|
|
uus831 wrote: Have to trust the programmer
Yeah. The best you can do is have a well defined,
consistent, and documented interface.
It's still up to us programmers to follow the rules,
no different than using something like the Win32 APIs.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have a DLL created in Visual Studio 2005, and going to use it in Visual Studio 2008. The function in the DLL takes CString as a parameter. Is it safe to send CString from VS08 to VS05/VC6 DLL? I think different versions of VC++ will have different internal implementation of CString and it would not be safe. Whats the best way?
|
|
|
|
|
The VS2005 and VS2008 sides are going to use different
CRT libraries so passing anything but const pointers
isn't going to be safe.
Also, as you mentioned, the CString implementations may be
different so passing CStrings isn't safe.
Passing LPCSTRs is safest - let the receiver make a local
CString copy from the passed pointer if necessary.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
What about sending std::string? Is it also NOT safe?
|
|
|
|
|
What about sending it as a LPCSTR
Bram van Kampen
|
|
|
|
|
Maybe I should..
|
|
|
|