|
OK, try MSDN here NetUserAdd[^]
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Excellent! Thanks, I'm off and running.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
OK, so I can add a user but NetGroupAddUser fails with NERR_GroupNotFound.
NetQueryDisplayInformation will only display one group called "None"/"Ordinary users".
The program is running as a local administrator and I've even tried impersonating Administrator.
Any ideas?
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Is the XP system connected to a Domain with Active Directory ?
How about NetLocalGroupAddMembers() ?
|
|
|
|
|
Hello,
I'm writing a C# application using managed and unmanged c++ libraries.
I have a bug, which causes an assertion "_BLOCK_TYPE_IS_VALID".
The message appears always in a different places.
Exceptions handling is not helping. Where to look?
|
|
|
|
|
Hi there!
I'm trying to show a series of bitmaps in a DialogBox but when I do this i have a big memory leak and I don't find how to stop it...
I've found that every time i call SetBitmapBits a new bitmap is allocated somewhere.
Oh, I'm also trying to deal with the flickering of the image
code:
void CLeakTestDlg::OnBnClickedLoop()
{
CClientDC dcScreen(this);
BYTE *bmp = new BYTE[250*250*4];
int i;
CBitmap image;
image.CreateCompatibleBitmap(&dcScreen,250,250);
for (i=0;i++<100;)
{
memset(bmp,(int)(2.5*i),250*250*4);
image.SetBitmapBits(250*250*4,bmp);
cImage.SetBitmap(image); //cImage is a CStatic control of a Picture Control
}
delete[] bmp;
}
|
|
|
|
|
eNez wrote:
...i have a big memory leak and I don't find how to stop it...
How do you know there is a memory leak?
I do not see that the for loop is doing anything productive. The first time through, it sets bmp to value 0, then to 2, then to 4, etc. Since little to no time has elapsed between calls to SetBitmap() , the net result is that only the last call to SetBitmap() will be seen, and even then I'm not sure what it will be.
Have you checked the return value of CreateCompatibleBitmap() and SetBitmapBits() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
After an run the function Task Manager show me 25 more Mb used by the program
i'm using vs.net 2002,
apparently the same code compiled under vc++6 have any problem.
(also vs.net 2003 have the same leak)
this loop do anything
the true program have to load images from a raw file and show them in sequence in the dialog.
because the image are encoded in a non-standard way i have to put the pixel values one by one in the bmp matrix.
I've written this function after seeing the leak in the main program(1000 frames = ~ 130Mb lost).
this are the same commands used to display the pictures and the memory is flooded the same way...
this is the code of the project
http://ombre.gamersrevolt.it/leaktest.zip
|
|
|
|
|
eNez wrote:
After an run the function Task Manager show me 25 more Mb used by the program
Do not use Task Manager to determine your program's memory consumption. It's a common misconception that the numbers reported by Task Manager are an accurate representation of your program's memory consumption, when they are actually just the size of your program's address space. Read this article, especially the last section, for a more detailed explanation.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
i see...
but this thing has anyway something wrong...
if i keep pushing the button that lauches the loop the memory used keep growing.
and... using GDIndicator (http://msdn.microsoft.com/msdnmag/issues/03/01/GDILeaks/default.aspx)
i see 100 more bitmaps every time i run the function...
and last thing the SAME code compiled with vc++6 don't eat memory, and don't uses more bitmaps
(and it run also considerably fast)
at least all this is strange
|
|
|
|
|
Need to close from handler of opening.
ShowDropDown(false)
not helps, due to it is probable handler ?
How to resolve this?
Thanks
|
|
|
|
|
Use the CB_SHOWDROPDOWN message
SendMessage(m_combobox.m_hWnd, CB_SHOWDROPDOWN, 1)
SendMessage(m_combobox.m_hWnd, CB_SHOWDROPDOWN, 0)
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
|
Very simple question how do you invert (or NOT) the bits in say a char .
e.g. char x = 0xCF;
<br />
Invert(x); From what I can see ther are only AND, OR and XOR that work on bitfields.
I am sure I am missing something!
Not too rude please.
|
|
|
|
|
use the ~ bitwise operator.
<br />
char x = 0xCF;<br />
char NOTx = ~(x);<br />
I Dream of Absolute Zero
|
|
|
|
|
Thanks, could not find it in my reference book or help.
|
|
|
|
|
http://www.codeproject.com/cpp/bitbashing.asp[^]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
if you want to reverse them you can use the Binary XOR (^) by 0xFF //(255)
example:
0xCF ^ 0xFF = 0x30
0x30 ^ 0xFF = 0xCF
|
|
|
|
|
Hello
I am developing an application with DLL support. I selected an MFC shared DLL accordingly and everything goes on fine, when I run the application from the Execute tool bar in the Visual Studio. But when I run the application independantly, by double clicking the executable in the Debug folder, I cannot load the DLL. Help me with a solution to this.
Regards,
Sreekanth Muralidharan,
Hyderabad
|
|
|
|
|
Check the working directory within VS. The DLLs must be in there.
Generally when an application looks for its DLLs it start by looking in:
* The working directory.
* The windows directory.
* The windows system directory.
You can either create a shortcut so that the working directory is the same. Build the application into the appropriate working directory or move/copy the DLLs the applictaion needs into its working (DEBUG) directory.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
When I import 32 bit icons into the resources, VS.NET removes the alpha layer from the 32x32 icon, thus making it into a 24 bit icon. Is there any way to make VS.NET stop doing that?
The only workaround I know so far is to add the icon resources manually by editing the .rc as a text file.
--
...Coca Cola, sometimes war...
|
|
|
|
|
I know how to change it by manually changing the control pad settings.
But what i want to know is how to change the settings in my programm.How?
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
Hi, I have done it, you must use DirectSound API and enumerate your sound card devices, then you can use their GUIDs to select each one separately.
I will take my program in codeproject as soon as possible.
|
|
|
|
|
Hi,can u send the program to me directly at xiayi@ustc.edu or max_xiayi@hotmail.com?
It is urgent for me.Thanks a lot.
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
I know how to change it by manually changing the control pad settings.
But what i want to know is change the settings in my programm.How?
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
Hi
I have a problem where I want to retrieve data from an ASCII file(containing grid points) an sort it into another file(in this case VTK file format). The thing is that my source file contains alot of text and I want to be able to jump to a certain place for instance "Number of points = ". I have not found a suitable way to adress this problem. I know how to go to a certain position using the usuall operators fstream and so on where I only can go to a specif position. I have looked around but found nothing. Would be grateful for any help!
/M
|
|
|
|