|
Hi all,
I want to enumerate all users in my active directory.
I found a class, but the file sddl.h is missing and there was no answer to questions regarding this file. I search the internet and all I found was, that I should use the Microsoft platform SDK. Well, I don't have it.
So, how can I get all the usernames in my active directory?
Juergen
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Thanks for the hint.
That was a question, I had then. The suggested solution did work as long, as my program was run on a domain controller. Now, I need a program, that can run on any client with any userrights in my domain.
Juergen
|
|
|
|
|
Strange, as I use that function all the time on non-DC machines. What problem(s) are you seeing?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Hi all,
I want to read the attributes of a file. Sounds easy, but there must be more attributes that just "Hidden and "System" and so on.
If you open the properties of a file, then there is a property-page, where you can store the author of this document, a short description, keywords and so on. I want to read and write these informations. Can anyone tell me, how it is done?
Juergen
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Hi
When we focused on the Network tray icon, we will get Lan Speed...How
should I get the Lan Speed in vc++...Is there any api call..
I'm eagerly waiting for ur response.....
Best regards,
nag.
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
hi
Thanq very much for ur prompt response and i'm thankful very much for ur kind suggestion...David what u suggest is helpful, but the following APIs r useful if the person don't want to use WMI...
we can use API for getting info of the specified interface...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/getiftable.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/getifentry.asp
once again thanq very much for ur kind suggestion..
|
|
|
|
|
Hello every one,
Please I need to know how is it possible to convert a decimal number to its binary, octal, and hex equivalents using C++ but without using predefined functions
marmosha
|
|
|
|
|
The classical question ... A number is neither binary, nor octal, nor hex, nor... It is just a number. What is binary or octal is its representation (so how you gonna print the value, to be 'readable' for a human).
A little example: if you have 31 apples on the table, you can say 'I have 31 apples' or 'I have 0x1F apples', you will still have the same number of apples.
So, you want to convert a number into a string ?
|
|
|
|
|
i do know that i should use a stirng to represent the decimal number in another format but the point is that i need to know how to get this format that is in the string
|
|
|
|
|
marmosha wrote: i need to know how to get this format that is in the string
Which string ?
Could you be more explicit and explain what you are trying to do exactly ?
|
|
|
|
|
Here is a base-10 to base-2 converter:
void DWORD_To_BinaryString( DWORD dwBase10, char szBase2[] )
{
for (int bit = 0; bit < 32; bit++)
{
DWORD dwMask = 0x80000000 >> bit;
if ((dwBase10 & dwMask ) == dwMask)
szBase2[bit] = '1';
else
szBase2[bit] = '0';
}
szBase2[32] = '\0';
}
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
will this be ok??
<br />
int deci = 4;<br />
char binStr[10];<br />
binStr=itoa(deci,binStr,2);
<br />
printf("Binary:%s",binStr);<br />
<br />
ouput:
Binary: 100.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
VuNic wrote: binStr=itoa(deci,binStr,2); //2 for bin, 16 for hex
It does not satisfy the "but without using predefined functions" requirement.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Thank you DavidCrow
marmosha
|
|
|
|
|
is there a way to open the folder dir selection in a specified folder?
i know there is a root folder i can pass to the struct, but then i don't see the folders above it...
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
YaronNir wrote: is there a way to open the folder dir selection in a specified folder?
See MSDN article Q179378.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
thanks!
i've wrote you a question about MyButton (other thread) probably you haven't seen it??
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
YaronNir wrote: ...probably you haven't seen it??
Yes, I saw it, but the question was a bit unclear.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
i have 2 types of buttons in my app, ones i create dynamically using Create Method and by this the OnChildNotify with WM_CTLCOLORBTN working 100% ok. the other type is resource buttons, where i place them in my resource editor on my dialog, and then in my code i use
void CDlg::DoDataExchange(CDataExchange* pDX)
to add a member to my button with the type of MyButton....but in this situation, i don't see the font change??? i've i place a break point (in debug mode) i do step in the if (CTLCOLORBTN == message) and i see the selectobject with my phone, but the result is not font changing but the font i see in the resources...
any ideas?
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
That was a mistake on my part. The CFont object should be a member of the dialog, and created in the constructor. In OnInitDialog() , call SetFont() for each of the buttons.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: In OnInitDialog(), call SetFont() for each of the buttons.
this is what i wanted to avoid.....that is why i created my class.....
any workaround?
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Try:
CMyButton::CMyButton()
{
LOGFONT lf = {0};
_tcscpy(lf.lfFaceName, _T("MS Sans Serif"));
lf.lfHeight = 28;
lf.lfWeight = FW_BOLD;
m_font.CreateFontIndirect(&lf);
}
void CMyButton::PreSubclassWindow()
{
SetFont(&m_font);
CButton::PreSubclassWindow();
}
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|