|
|
hi,,
oh ok.
There is an implementation of the AES algorithm in the below link. If u download it..
http://www.thecodeproject.com/cpp/aes.asp
in Table.h
(1.) Why have they used s boxes in ‘int’s? why not
const int CRijndael::SBox[256] rather than ---const char CRijndael::SBox[256] and replace the negative values with positive?
(2.) What does
const int CRijndael::sm_T1[256] …. const int CRijndael::sm_T8[256] tables correspond to?
(3.) and const int CRijndael::sm_U1[256]…const int CRijndael::sm_U4[256] tables correspond to
(4.) also const int CRijndael::sm_shifts[3][4][2] tables correspond to?
tnx
|
|
|
|
|
Friends,
I developed an application in VC++ using MFC. I like to launch it at startup. The two methods i know for this purpose are:
1) Placing shortcut in startup folder.
2) Registry enrry: HKCU\Software\Microsoft\Windows\CurrentVersion\Run
Are there other methods you know for this purpose ??
Imtiaz
|
|
|
|
|
Place a shortcut to the application in the user's Startup group. Under Windows NT/2000/XP, there are two Startup groups, one for the individual user and one for 'All Users'.
Software Zen: delete this;
|
|
|
|
|
Imtiaz Murtaza wrote:
Are there other methods you know for this purpose ??
See the MSDN article Q179365.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
I've got a .net dll registered for COM, which fires events. Is there any possible way to handle events fired from that dll?
Thanks in advance for any help or clue.
i.chen
|
|
|
|
|
Hi.
Does anybody know how to make a executable VC++ file
with a built in dll hook?
cause i get tired of using a loader, so i wanna try this.
greetz
DP
|
|
|
|
|
|
thnx for your reply.
i want to hook my DLL into another application.
the dll itselfs works, so i use an injector.
the problem is i want to do this in one exe which "contains" my dll, so i don't need the loader.
greetz
DP
|
|
|
|
|
I would like to make a DLL with template functions and classes. How this can be done?
Thank you
DO!
|
|
|
|
|
templates can be defined only in h file, so they can not be in dll.
this is c++ syntax, no other choices.
includeh10
|
|
|
|
|
Templates are used by the compiler to "copy and paste" the code for datatypes that are used with a particular function. By the time it becomes a dll, there is no more need for the template.
|
|
|
|
|
Hi!
I want to start/stop windows service from my C++ program. How do I do that? I searched google but found nothing
Thanks!
Regards,
Iliya Yordanov
www.csharp-home.com - C# Resources
|
|
|
|
|
To start a service, use the StartService API function. To stop, pause, or continue it, use the ControlService API function.
|
|
|
|
|
|
I am very sorry because my english is too bad!!!
I need some code optimizer (can check and warn about run-time error in my source code).
Thank you very much!
maiquan
|
|
|
|
|
Doesn't the normal Visual Studio debugger/compiler do the job?
Joel Holdsworth
Wanna give me a job this summer?
Check out my online CV and project history[^]
|
|
|
|
|
Hi,
After many years, I've started developing C++ app to log into another server and perform some tasks. I'm getting the error 1314 (A required privilege is not held by the client), when I execute LogonUser function. Before I'm getting error 1300 (Not all privileges referenced are assigned to the caller), when I execute AdjustTokenPrivileges. I'm thinking that this error 1300 is triggering the error 1314. How can I get rid of these errors? FYI, I'm trying to log into my local machine with the local username/password (LOGIN/PASSWORD). This is a Win 2k pro machine, which is not part of any domain. I'm observing all these error codes while stepping thru the code in MS Visual env.
Last point is, LookupPrivilegeValue is returning an error code of 997 (Overlapped I/O operation is in progress). Could this also be causing the current problem?
Any help or pointer in resolving my current issue is greatly appreciated. Have a nice day & week ahead!
Code snippet:
char *szUserName = (char*)malloc(65);
char *szDomain = (char*)malloc(65);
char *szPassword = (char*)malloc(65);
strcpy(szUserName, "LOGIN");
strcpy(szDomain, ".");
strcpy(szPassword, "PASSWORD");
DWORD dwSize = 50+1;
char szUser[50+1]={0};
PROFILEINFO MyProfile = {0};
LUID Luid;
//The following stmt is throwing error 997 (Overlapped I/O operation is in progress)
if(!LookupPrivilegeValue(NULL, SE_TCB_NAME, &Luid))
{
OutputDebugString("LookupPrivilegeValue failed.\n");
iLastError = GetLastError();
goto Exit;
}
HANDLE hProcToken;
if(!OpenProcessToken(
GetCurrentProcess(),
TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY|TOKEN_DUPLICATE,
&hProcToken))
{
OutputDebugString("OpenProcessToken failed.\n");
iLastError = GetLastError();
goto Exit;
}
TOKEN_PRIVILEGES TokenPriv;
TokenPriv.PrivilegeCount = 1;
TokenPriv.Privileges[0].Luid = Luid;
TokenPriv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
//The following stmt is throwing error 1300 (Not all privileges referenced are assigned to the caller)
if(!AdjustTokenPrivileges(
hProcToken,
FALSE,
&TokenPriv,
0,
NULL,
NULL))
{
OutputDebugString("AdjustTokenPrivileges failed\n");
iLastError = GetLastError();
goto Exit;
}
// Log on as user with valid credentials for accessing the Exchange server.
//The following stmt is throwing error 1314 (A required privilege is not held by the client)
if (!LogonUser(
szUserName,
szDomain,
szPassword,
LOGON32_LOGON_SERVICE,
//LOGON32_LOGON_INTERACTIVE,
LOGON32_PROVIDER_DEFAULT,
&hToken))
{
OutputDebugString("LogonUser failed.\n");
iLastError = GetLastError();
goto Exit;
}
Thanx,
harish
|
|
|
|
|
Hi,
It's probably stupid question,but how can i change the tabs order in my dialog?
Regards,
Eli
|
|
|
|
|
In the dialog editor, just press Ctrl+D, and the current tab order is displayed with each control having a numeric label. Just click on each control in the order you want to change the order.
|
|
|
|
|
Finally..........
Thanks,
Eli
|
|
|
|
|
An extra tip would be renumbering a control after the complete dialog is set.
If you want to later change the tab order in the dialog editor press CTRL+D to show the tab numbers then hold the CTRL key down and clik on the item before you want to begin renumbering. Then release the CTRL key and the next item you click on will start with the number after the item you just clicked. So if you have 55 items and you need to renumber after the 30th one no need to start over. Just press CTRL click on the 30th release the CTRL and away you go.
|
|
|
|
|
Hi,
I want to be able to toggle between bitmaps each time the button (in a toolbar) is being clicked. How should I do it?
thanks,
yaron.
|
|
|
|
|
check thiz ......
http://www.codeproject.com/bitmap/bmpscroll.asp[^]'
u should find usful information in that....just got to modify that a little bit.....
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
Currently, I have a COM event which I've created a sink for and all of that jazz. It receives events at the Invoke method of course. Then i use dispIdMember to figure out which event was called. The only problem is that the event is fired from a different thread as the rest of my program, which poses a huge problem. Is there a way that I can call a function on threadA from threadB?
|
|
|
|