|
Don't know if this should be in the Operating Systems area but I was just wondering if anybody knows how to get the username of the person logged on a machine on a novell network.
Basically I'm making a program that I only want a number of people I know to be able to use [chances are it will be distributed without my knowledge] and the program will only be run on my college network [running mainly win2k machines on a novell network]. So i want to be able to read the username of the person logged in an compare this against a list of allowable usernames [probably private data members or in a struct somewhere] within the program.
Any help greatly appreciated.
dela
Now taking suggestionsfor a new sig. please email me all suggestions.
|
|
|
|
|
I don't know how Novel networks integrate with Win2k, but could it be that <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/sysinfo_9jj9.asp">GetUserName</a> provides you with the info you're after?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanx... I should have found that myself!!!
Now taking suggestionsfor a new sig. please email me all suggestions.
|
|
|
|
|
Hi! I'm a very beginner in VC++ programming and
I have some trouble with it.
Before C++ I used VB and Pascal and there were some routines for converting an int to a char*
and vice versa (Str and Val). But I cannot find them in C++!
If you know the answer for my question, please
help me!
Thanks.
|
|
|
|
|
This is one way:
int i=101;
char str[256];
sprintf(str,"%d",i);
char * str="101";
int i;
sscanf(str,"%d",&i);
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank you!
|
|
|
|
|
|
Of course atoi is an excellent alternative. I guess I chose sscanf just for symmetry with sprintf .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi, does any one have or know a site to get a C or C++ implementation of Prim's algorithm for finding a Minumum Spanning Tree?
"Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
|
|
|
|
|
I can recommend "Introduction to Algorithms" by Cormen, Leiserson and Rivest. ISBN 0-262-03141-8 (MIT-press) or ISBN 0-07-013143-0 (McGraw-Hill). My printing is from -92, and there could be newer ones. It (or the like) should be part of every programmers library. It contains pseudo-code examples, easy to convert into C++.
|
|
|
|
|
The Boost Graph Library implements this algorithm (and a lot more). Plus, it is a beatifully crafted library, if you like the STL way.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Here's the question - I use threads of type "UINT MyFunc(LPVOID pParam)" and inside I pass CListCtrl pointer and use MFC classes as CString. Is that correct - I mean can I loose in some conditions information?
|
|
|
|
|
It's ugly as anything, you can thank Microsoft for that. But it will work fine.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
I come back with an old question: how could i bring a modeless dialog box to background? Background meaning behind the parent window, not hiding.
Is it possible by changing the modeless' settings?
Wish for help!
rechi
|
|
|
|
|
No you can't change the modeless settings. All that modeless means is that it uses the main message loop to get access to its messages. A modal dialog box creates and uses its own message loop.
Have you tried to set the ZOrder of the windows in order to make your dialog set behind the main one? Use SetWindowpos for this.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
It's useless. I've tried and it has no effect. Despite this, i can
successfuly hide the modeless using SetWindowPos.
rechi
|
|
|
|
|
|
Try this
BOOL ReadProcessMemory(
HANDLE hProcess, // handle to the process
LPCVOID lpBaseAddress, // base of memory area
LPVOID lpBuffer, // data buffer
SIZE_T nSize, // number of bytes to read
SIZE_T * lpNumberOfBytesRead // number of bytes read
);
|
|
|
|
|
thanks! i need full source code!
|
|
|
|
|
|
|
Have you looked at PEDUMP. It is a sample program by Matt Petriek in MSDN. It shows how to walk through the PE file format and extract all of the information including the import table.
One thing that you will need to do is resize the file in order to accomodate the new entry because there is no extra space for new entries.
Another thing to worry about is Windows 2000 and up will complain if you try to change any of their executables.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
|
Can somebody please give me URL to any utility for searching a string withing another string. I know VC++ is very powerful. I want to use the utlity in Visual Basic. It would be nice if there is utility in DLL form which I can use in Visual Basic. Does someone know. Please help me.
|
|
|
|
|
Can't you use built-in function InStr for this purpose? My guess is that its performance will match that of any regular implementation in C++.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|