|
How about using an installer ?
InstallShield, VISE, NSIS, ...
|
|
|
|
|
|
Look at QSetup Installation Suit
sanket patel
|
|
|
|
|
Hi,
I'm coming up to speed on C++ AddIns (I plan to write one). Having played with a lot of samples, I think I've got a handle on the basic architecture.
I see that it's common to have TWO dlls registered for a given AddIn -- one that seems to be just a bootstrap that tells VS about the other one (the projects are typically called MyAddin and MyAddinControl).
I see it's quite possible to do it all in a single dll, and in fact that's the framework provided by the VS wizard when you create an AddIn. So I'm wondering why people seem to like to split it in two pieces? Is there some advantage to doing that?
Thanks!
DB
|
|
|
|
|
Purpose is to develop secure application, which will store sensitive data only in RAM, preventing sensitive data to be written on hard drive. Turning off the computer will erase data stored in RAM. THANKS A LOT
marcelse
|
|
|
|
|
I do not know about managed code, but in unmanaged code ‘new’ and ‘malloc’ would not normally allocate virtual memory, although that may have changed. Dig through the docs and code to find out.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Thanks for your reply John, I have read a lot of documentation, but only info I got is that operation system will decide what memmory will give to application, physical or virtual, but I have to be 100% sure that sensitive data were not written on HDD.
marcelse
|
|
|
|
|
All I know is that ‘malloc’ use to only allocate memory from the heap and MS’s older version of ‘new’ use to get the actual memory by calling ‘malloc’ before calling the C++ constructor. MS’s newest OS may not work that way any more, but testing it by allocating really huge amounts of memory may give you the answer.
May be you should check if ‘Jeffrey Rickter’ has written a new book that covers that, or may be one of his articles in MSJ mag.
Good Luck!
(There seem to be some network problems – I tried to post this 3 times, so far)
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
I think that you can't be sure of that: it is the operating system that decide to store temporary part of the virtual memory on the HDD to free some resources. Probally you can't bypass that mechanism, I don't know any function to mark the pages of memory as "sensitive" and leave they on the RAM.
Sorry
Cheers,
Russell
|
|
|
|
|
John R. Shaw wrote: do not know about managed code, but in unmanaged code ‘new’ and ‘malloc’ would not normally allocate virtual memory, although that may have changed. Dig through the docs and code to find out.
new and malloc do allocate virtual memory and have done since memory virtualisation was introduced.
Steve
|
|
|
|
|
|
Hello!
seach for the concepts like RamFS, RAM disk....
http://www.superspeed.com/desktop/ramdisk.php
sanket patel
|
|
|
|
|
THANK YOU ALL, FOR YOUR REPLY, I will try to find out more about ramfs,virtuallock, AWE - alocatephysicalpage
REGARDS
marcelse
|
|
|
|
|
REPLY TO ALL:
Solution is AWE .... Address Windowing Extensions
it can allocate physical RAM and then map it to use...
not so straightforward but, I hope it will fit my needs..
THANKS
marcelse
|
|
|
|
|
I am creating few keys in registry through MFC. Everything works well in some systems but in some systems it doesn't create, what could be the problem??
|
|
|
|
|
peace of code and enumeration of system will be helpfully
Best regards,
Baron
|
|
|
|
|
But I can create registry entries manually but unable to create through code in some systems
If Admin privilages would be the problem how do i give permission to create registry entries through code?
The code what i have written is:
DWORD dwMaxLength = MAX_COMPUTERNAME_LENGTH + 1;
char szComputerName[MAX_COMPUTERNAME_LENGTH + 1];
GetComputerName(szComputerName, &dwMaxLength);
HKEY hHeadKey;
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Database", 0, KEY_QUERY_VALUE,&hHeadKey) == ERROR_SUCCESS)
TRACE("Key exists in registry");
else if (RegConnectRegistry(szComputerName,HKEY_LOCAL_MACHINE,&hHeadKey) == ERROR_SUCCESS)
{
HKEY hSubKey1, hSubKey2;
if (RegCreateKeyEx(hHeadKey,"SOFTWARE\\Database",0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&hSubKey1,NULL) == ERROR_SUCCESS)
{
CString str = "SOME TEXT";
RegSetValueEx(hSubKey1,"Key1",0,REG_SZ,(const unsigned char *)(LPCSTR)str,str.GetLength() + 1);
}
if (RegCreateKeyEx(hHeadKey,"SOFTWARE\\Database",0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&hSubKey2,NULL) == ERROR_SUCCESS)
{
CString str = "SOME TEXT";
RegSetValueEx(hSubKey2,"Key2",0,REG_SZ,(const unsigned char *)(LPCSTR)str,str.GetLength() + 1);
}
}
|
|
|
|
|
Change KEY_ALL_ACCESS on KEY_WRITE. In some OS like Win2000 it was help
Best regards,
Baron
|
|
|
|
|
Thank you Baron I'll check it.
|
|
|
|
|
The user running your application doesn't have permission to create registry entries, would be my guess.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
But I can create registry entries manually but unable to create through code in some systems
If Admin privilages would be the problem how do i give permission to create registry entries through code?
The code what i have written is:
DWORD dwMaxLength = MAX_COMPUTERNAME_LENGTH + 1;
char szComputerName[MAX_COMPUTERNAME_LENGTH + 1];
GetComputerName(szComputerName, &dwMaxLength);
HKEY hHeadKey;
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Database", 0, KEY_QUERY_VALUE,&hHeadKey) == ERROR_SUCCESS)
TRACE("Key exists in registry");
else if (RegConnectRegistry(szComputerName,HKEY_LOCAL_MACHINE,&hHeadKey) == ERROR_SUCCESS)
{
HKEY hSubKey1, hSubKey2;
if (RegCreateKeyEx(hHeadKey,"SOFTWARE\\Database",0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&hSubKey1,NULL) == ERROR_SUCCESS)
{
CString str = "SOME TEXT";
RegSetValueEx(hSubKey1,"Key1",0,REG_SZ,(const unsigned char *)(LPCSTR)str,str.GetLength() + 1);
}
if (RegCreateKeyEx(hHeadKey,"SOFTWARE\\Database",0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&hSubKey2,NULL) == ERROR_SUCCESS)
{
CString str = "SOME TEXT";
RegSetValueEx(hSubKey2,"Key2",0,REG_SZ,(const unsigned char *)(LPCSTR)str,str.GetLength() + 1);
}
}
|
|
|
|
|
I haven't dug very deep into your code, but everyone of the registry functions returns an error code; use it, it would probably tell you what the error is.
Use the TRACE macro to know where it fails and what the error code is. For your own convenience I suggest you also use ::FormatMessage(...) and write the system error message instead of a hex number. See here[^].
Are you able to connect to the remote registry where it doesn't work and what OS version is running on the remote system?
OT: please use the <pre> tags when you're posting code.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thank you for the suggestion.
The OS where I am creating registry entries is Windows NT.
|
|
|
|
|
requesting the regsam=KEY_ALL_ACCESS will fail if your user is not an administrator.
This behavior is modified on Vista but that's a story for another day...
|
|
|
|
|
Hello,
Suppose I have
vector<CString>StringVector
vector<int>IntVector
If I have above strutures in my program then do I need to worry that CString will take up variable number of bytes for each member of the vector and it may cause problems while accessing data in the vector
As otherwise each member in the IntVector is going to take up equal number of bytes so accessing member from IntVector is fine.
Please tell me whether I should take care while making a vector of CStrings .
Prithaa
|
|
|
|
|