|
What do you want to know? The encrypt method, or the encripting with vc++? You can google and find encrypt method.
<italic>Work hard, Work effectively and a bit of luck is the key to success.
|
|
|
|
|
|
Hi,
I am trying to delete a value from my windows registry through VC++ code. Tried using a couple of win API's like RegDeleteValue(), DelRegTree but did'nt really work.
May be I am passing incorrect arguments or I am using the wrong functions. I would appreciate if someone shares his/her views, may be the method to be used or so.
eg.
I have to delete XXX from the registry. This is how my registry looks.
HKEY_CURRENT_USER
Software
Something
ProductV1
ProductV2
XXX
Thanks
|
|
|
|
|
Here is small Source code
#include <atlbase.h>
CRegKey key;
if(key.Open(HKEY_CURRENT_USER,"Software\\Something\\ProductV1\\ProductV2")==ERROR_SUCCEESS)
{
key.DeleteValue("XXX");
key.DeleteSubKey("123");
key.Close();
}
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Something has badly changed in .NET compared to vc 6.
I am getting an error
error C2065: 'CRegKey' : undeclared identifier
But I looked at .NET\atlbase.h, I see a class named CRegKey.
Anybody any ideas?
Thanks
|
|
|
|
|
It's going to be hard to show what you did wrong if you don't show us the code that is not working.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I copied and pasted the same code that Alok listed above.
Also included the header file #include <atlbase.h> in the source code. Thats all I did.
Thanks
|
|
|
|
|
Ok, but what about the code that you had before CRegKey was suggested? There is no reason why you should not be able to get that working.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I had tried this earlier. But RegDeleteValue always returns 2 (file not found error)
long retVal = RegDeleteValue(HKEY_CURRENT_USER, "Software\\Company Name\\Product Name\\File-TT");
Thanks
|
|
|
|
|
Maybe for this one you need to use:
HKEY MyKey;<br />
<br />
LONG RegOpenKey(<br />
HKEY_CURRENT_USER, "Software\\Company Name\\Product Name,<br />
&MyKey<br />
);<br />
<br />
RegDeleteKey( <br />
MyKey, <br />
"File-TT"<br />
);<br />
<br />
RegCloseKey(MyKey);
You delete registry values by opening the entire key, you delete registry keys by opening the parent key and then calling RegDeleteKey with the name of the child.
|
|
|
|
|
Hi All,
I want to write a simple C/C++ program which should be able to display All Unicode characters, that are present in character set of any Standard Unicode Font.
I am using the wchar_t data type to store the character constant but how can i pass the Unicode value for a literal like HINDI Aa (\u0905)
But it will always give the error literal constant extends limit
Can Anyone help me out
Thanks In Advance
Nitin Mahajan
|
|
|
|
|
|
#include <conio.h>
#include <locale.h>
#include <iostream.h>
#include <stdlib.h>
#include <stdio.h>
int wmain( int argc, wchar_t *argv[ ], wchar_t *envp[ ] )
{
wchar_t wc = '\x0907';
cout<<wc;
getch();
}
now="" i="" am="" getting="" the="" error=""
ibcd.lib(wwincrt0.obj)="" :="" lnk2001:="" unresolved="" external="" symbol="" _wwinmain@16
and="" want="" to="" send="" this="" character="" <b="">wc to a notepad window for displaying the it there by pressing a button from my application. Is there any way you have for that?
I have tries the postmesage API but it doesn't work as:
PostMessage(HWND_BROADCAST,ch,WM_CHAR,0);
Thanks 4 Ur Reply
|
|
|
|
|
nitinmahajan80 wrote:
int wmain( int argc, wchar_t *argv[ ], wchar_t *envp[ ] )
Isn't that Decalartion Right,WinMain Sig. is something like this
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR cmdLine,
int nShowCmd)
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
No Mr Alok,
This is used only when we are making the MFC DLL but i am making the Win32 Application
And what about Postmessage that i am asking abot have u got any idea.
I am presently loking for WM_UNICHAR windows message to be send as parameter in Postmessage API which is not implemented for versions before windows XP
|
|
|
|
|
|
I have done that & so far i am successful in displaying string in the AfxMessage dialog box. But my problem is that I want to write the data into the file or to the notepad.
For this i am using the concept of :
i}
wmain()
{
wchar_t tch = L'\x311b';
TCHAR *tstring;
...
_stprintf(tstring,_T("Tchar Character : %su"),(LPCTSTR)tch);
...
}
2}
PostMessage , SendMessage API and trying to pass WM_UNICHAR message to that but till now not succesful
|
|
|
|
|
Hello guys,
Requirement:My Application should work with any baudrate starting from 01- 256k ideally and i need to implement for 76800 baud with out fail.
Constraint:We are able configure the bauds from 0 - 9600 (all the numbers), 10400,14400,19200,38400,56000,57600,etc..... when i give different baudrate from the above list, the error comes is Invalid Parameter.
Question: Is there any work around to overcome this constraint.It's really urgent.
can someone through light on this.????
Thanks in advance.
Adi
|
|
|
|
|
I take it your tryig to set the baud rate through a DCB structure and the BaudRate member.
Ar eyou setting it like this:
dcb.BaudRate = 76800;
The other issue could be that some of the othere DCB parameters are not filled out correctly.
If you vote me down, my score will only get lower
|
|
|
|
|
Hello Roger,
Thanks for your response. Yes i'm setting the baudrate and other configuration parameters of serial port using DCB structure only with SetCommState() Function.
so when i use baudrates like 76800, the return value of SetCommState() function is INVALID_PARAMETER. So i want to know if anyone has done something to achieve this kinda baudrates configured with serial port for their requirements.
Thanks
Adi
|
|
|
|
|
Some systems (drivers) have a list of accepted baud rates, I'm not sure if that could be your problem. Certainly on standard PC serial ports the hardware only allows a limited selection of baud rates and the driver will reflect this.
Elaine
The tigress is here
|
|
|
|
|
yeah it's true there are limited which driver supports which is documented in the header ntddser.h file. The hardware support depends on the highest speed of the hardware (till 1990s the speed was 115.2 k, after 2000's it's become more than that like 230K, 430K etc.....).
The baudrates that are supported by the drivers are derived from the devisors of the highest speed.(Ex:115.2k - devisor 1,57600-div2,38400-div 3 ..etc).
So i'm looking for what can be done to achieve the baudrates (such as 76800) which are exact divisors of the highest speed(incase of 115.2k) also.
Please let me know if you know any leads on the same.
Thanks for your info sharing
Adi
|
|
|
|
|
Hello, I have a serious problem because i want to do a application that sends to other application the permisions that this application will have. But my problem is how can i do it and when i send the permission how can i lock the files to protect my computer.
Thank you very much
|
|
|
|
|
densitet wrote:
i want to do a application that sends to other application the permisions that this application will have
Uhhh.. what does that mean ??? What do you mean by permissions ?? And which other applications ??
densitet wrote:
when i send the permission how can i lock the files
Which files ???
Maybe I'm completely missing the point but I really don't understand what you want to do. Try maybe reformating your question a little bit clearer.
|
|
|
|
|
Ok, thank u for answer. I will try explain better. We can say that I have a client and a server running in the same machine where the client send information to the server to authentication, so when the server authentice this information, it should be to know to which files has permiss, for example if i am "densitet" and im authenticated the server should be to know that i have only permisses to pdf files. But i dont know how can i store the information of the different users in the server (lists, bbdd, text files...), because i want that for example like in the windows XP i want to have users with all rights, users that only access a doc files,.... And when the server know that i have permissions to doc files for exmaple i want to block the rest of the files.
Thank you very much.
|
|
|
|