Click here to Skip to main content
15,909,332 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Draw on screen outside application window Pin
_AnsHUMAN_ 24-Jun-08 0:04
_AnsHUMAN_ 24-Jun-08 0:04 
AnswerRe: Draw on screen outside application window PinPopular
Jijo.Raj24-Jun-08 1:22
Jijo.Raj24-Jun-08 1:22 
GeneralRe: Draw on screen outside application window Pin
garyofcourse24-Jun-08 3:54
garyofcourse24-Jun-08 3:54 
GeneralRe: Draw on screen outside application window Pin
Jijo.Raj24-Jun-08 7:45
Jijo.Raj24-Jun-08 7:45 
QuestionSocket Ping vs Connect Performance Pin
od@ananzi.co.za23-Jun-08 23:16
od@ananzi.co.za23-Jun-08 23:16 
AnswerRe: Socket Ping vs Connect Performance Pin
Moak6-Jul-08 4:51
Moak6-Jul-08 4:51 
Questionfile association question in MDI , about dde Pin
followait23-Jun-08 22:56
followait23-Jun-08 22:56 
QuestionAbout CreateProcessAsUser Pin
hanlei000000000923-Jun-08 22:13
hanlei000000000923-Jun-08 22:13 
HANDLE   hToken;  

	if(!GetTokenByName(hToken,"EXPLORER.EXE"))   
	{   
		return   FALSE;   
	}   

	STARTUPINFO   si;   
	PROCESS_INFORMATION   pi;   

	ZeroMemory(&si,   sizeof(STARTUPINFO));   
	si.cb=   sizeof(STARTUPINFO);   
	si.lpDesktop   =   TEXT("winsta0\\default");   


	BOOL   bResult   =   CreateProcessAsUser(hToken,"D:\\1.bat",NULL,NULL,NULL,   FALSE,NORMAL_PRIORITY_CLASS,NULL,lpCurrentDir,&si,&pi);  



I use CreateProcessAsUser run 1.bat attach a database to sql server 2000.

1.bat:

OSQL -E -Q "sp_attach_db @dbname = 'YDJC2', @filename1 = '%CD%\database 08-6-5\YDJC2_Data.MDF', @filename2 = '%CD%\database 08-6-5\YDJC2_Log.LDF'" 


But, this database is read only attribute in sql server 2000, why?

I double click mouse button to run 1.bat is OK, database is read/write attribute in sql server 2000.

How to use CreateProcessAsUser to solve this problem?
QuestionMFC DLL Pin
bhanu_850923-Jun-08 21:14
bhanu_850923-Jun-08 21:14 
AnswerRe: MFC DLL Pin
Cedric Moonen23-Jun-08 21:20
Cedric Moonen23-Jun-08 21:20 
GeneralRe: MFC DLL Pin
bhanu_850923-Jun-08 23:13
bhanu_850923-Jun-08 23:13 
AnswerRe: MFC DLL Pin
Hamid_RT23-Jun-08 21:24
Hamid_RT23-Jun-08 21:24 
GeneralRe: MFC DLL Pin
theCPkid23-Jun-08 22:26
theCPkid23-Jun-08 22:26 
GeneralRe: MFC DLL [modified] Pin
bhanu_850923-Jun-08 23:12
bhanu_850923-Jun-08 23:12 
GeneralRe: MFC DLL Pin
bhanu_850924-Jun-08 1:54
bhanu_850924-Jun-08 1:54 
GeneralRe: MFC DLL Pin
theCPkid24-Jun-08 2:19
theCPkid24-Jun-08 2:19 
GeneralRe: MFC DLL Pin
bhanu_850925-Jun-08 1:53
bhanu_850925-Jun-08 1:53 
GeneralRe: MFC DLL Pin
theCPkid27-Jun-08 22:11
theCPkid27-Jun-08 22:11 
QuestionSetting the wallpaper Pin
theCPkid23-Jun-08 21:10
theCPkid23-Jun-08 21:10 
AnswerRe: Setting the wallpaper Pin
Hamid_RT23-Jun-08 21:23
Hamid_RT23-Jun-08 21:23 
AnswerRe: Setting the wallpaper Pin
theCPkid23-Jun-08 22:33
theCPkid23-Jun-08 22:33 
GeneralRe: Setting the wallpaper Pin
Hamid_RT24-Jun-08 0:23
Hamid_RT24-Jun-08 0:23 
AnswerRe: Setting the wallpaper Pin
Jijo.Raj24-Jun-08 0:30
Jijo.Raj24-Jun-08 0:30 
GeneralRe: Setting the wallpaper Pin
theCPkid24-Jun-08 2:38
theCPkid24-Jun-08 2:38 
GeneralRe: Setting the wallpaper Pin
Jijo.Raj24-Jun-08 3:41
Jijo.Raj24-Jun-08 3:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.