|
hello!
can anyone tell me why NetUserSetInfo gives an error while using the structure USER_INFO_1005 in windows XP and NT. the error value is 87 and the value of the last parameter of the function is 5.
can anyone please help me
thank you
|
|
|
|
|
Has it worked in the past? Can you show us a code snippet of how you are using the function?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
DWORD adminStatus;
DWORD check;
USER_INFO_1005 user;
user.usri1005_priv= USER_PRIV_ADMIN;
adminStatus=NetUserSetInfo(NULL,username,1005,(LPBYTE)&user,&check);
This is way i am trying to use this function.The same is given in MSDN.
Thank you.Waiting for your reply.
|
|
|
|
|
Is username the right type and have the right value?
Can you use NetUserSetInfo() with 1003? I'm just trying to ascertain if it's related to 1005 or NetUserSetInfo() in general.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I included <TLHELP32.H> in my project then got the compiler error says ULONG_PTR is undeclared identity. What am I missing?
|
|
|
|
|
=[ Abin ]= wrote:
What am I missing?
Not sure, since there is no ULONG_PTR in TLHELP32.H. If you remove the inclusion, does the compiler still complain?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
|
Hi there!
I have to use some functions in my application but they must be in an apart file because they are going to be used from differents applications. How should I write it in my code so it runs? What headers should I add to my code?
Thank you in advance!
|
|
|
|
|
Put the declaration of the function(s) in a .H file. Put the definition of the function(s) in a .C or .CPP file. Whenever you need to use one of the functions, simply include the appropriate .H file.
To keep the linker from complaining about multiply-defined symbols, you'll need something like the following at the top of each .H file:
#if !defined(some_unique_symbol_here)
#define some_unique_symbol_here
#pragma once
...
#endif
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I'm looking for advice/opinions on DAO vs ADO vs ODBC converting an MFC/VC6 app to VC7(.net)
All my DAO functions have been declared deprecated in VC7 so I'm a little nervous regarding future support.
Can I do the same things with ADO/ODBC as I can with DAO - I need to be able to create the Access database as well as read and write to it.
How about performance -DAO vs. the rest.
Or should I start thinking about deploying personal SQL server on all my machines in the field. In that regard can I look at a SQL server database with Access (all my users are familier with Access, so loosing that functionality is a drawback)
Also have some odd things happening with DAO in VC7 - like the connection being closed when returning from a function (as if the destructor gets called when it shouldn't)
I know thats a lot to ask, but any and all opinions or help will be greatly appreciated.
Thanks in advance,
John Horstkamp
|
|
|
|
|
From experience ADO and MSDE are the way to go. I switched about 3 years ago from DAO to ADO because DAO is not thread safe and my applications are all multithreaded. Also MSFT support for DAO is declining. There is a learning curve but it is worth it. Most examples in ADO used to be geared twards VB but that has changed a bit now. As for MSDE, its free and works fine for all my applications. The only problem I have had with it was we were hit with the slammer worm that also hit SQL server...
Here is a good place to get you started:
http://www.codeproject.com/database/caaadoclass1.asp[^]
John
|
|
|
|
|
Thanks,
So how does MSDE relate to SQL server?
BTW - the app is not really a high performance database.
The "admin" info is fairly trivial even for Access.
The point of concern is that there is also a lot (can be really huge)
numerical info (calibration data) that I store in the Access equivalent of a blob. Will I see performance gains with MSDE/SQL server?
|
|
|
|
|
After doing a little research on MSDN it does seem that MSDE and ADO are the way to go...Downloading MSDE now.
I may have further questions...<grin>
Thanks for the response
John
|
|
|
|
|
IMO, the benefits of ADO far outweigh that of DAO (ADO.NET is even better). With MS declaring DAO depricated in VC7, this not only means no support but also no backward compatibility.
MSDE is more robust and has much more functionality than Access. Users can continue to use Access by linking to SQL Server.
|
|
|
|
|
"...(ADO.NET is even better)"
In what regards (or is that too open ended a question)?
|
|
|
|
|
I guess it depends on what you're trying to do. Lately I have been working with XML out of databases and find that ADO.NET has much more functionality in that area. If your app is not using the .Net platform then it will probably be too much overhead to include with the distribution.
|
|
|
|
|
Don't have much experience with XML but I thought XML is more of a data transport mechanism as opposed to a data storage mechanism.
Actually, what I am doing (for a variety of reasons) is changing an application from using the Microsoft serialization scheme to a relational database scheme. The app object model actually lends itself nicely to a relational database. The database (50 or more .dat files or 1 .mdb) is fairly stable - ie nothing changes - once a site is calibrated and up and running. The creation and calibration of a site is another story. The admin portion of the database is trivial - even for Access. There is however a large portion of numerical (calibration) data that I store as a blob.
The app was started in VC6 and I am converting to VC7. It will run on Win2k and XP machines (and maybe NT at some old sites).
I don't know if that's too much info...or even makes sense... or is relavent
John
|
|
|
|
|
After doing a little research on MSDN it does seem that MSDE and ADO are the way to go...Downloading MSDE now.
I may have further questions...<grin>
Thanks for the response
John
|
|
|
|
|
Hi all!
I'm trying to do a Visual C++ application. I have the main file parlante.cpp, and it uses classes from imevo.cpp
When I compile each file separately, I get no errors, but when I build the application I get lots of unresolved external symbol in imevo.obj when linking. Which could be the reason for this?
What should I submit here so you could help me with this if what I've said it's no enough?
Thank you in advance!
|
|
|
|
|
LNK2001 can be caused by a number of reasons. See here for more.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Add the files to your project.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
When running my app on a Novel Network it generates this error: "Error 0203" saying 'Error in saving message'
This is the first time that I've run into this error and I don't know what it means. My app is written in Vvisual C++.
Can you help?
|
|
|
|
|
Ok, do you have code that is saving messages on a remote machine?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hello,
I'm changing code on an existing project. I wanted to use the CCritical class, but I get an error when I compile with the Afxmt.h header. The compiler says not to use the windows.h header. I tried to comment out references to windows.h, but it did not work. I tried to set the project settings to MFC, but it did not work either. Any help??? Thanks.
|
|
|
|
|
Anonymous wrote:
I wanted to use the CCritical class...
What class is this? Did you mean CCriticalSection ?
Anonymous wrote:
The compiler says not to use the windows.h header
Of course. It has already been included by AFX/MFC, hence the preprocessor's redundancy message.
Anonymous wrote:
I tried to comment out references to windows.h, but it did not work
Meaning what?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|