Click here to Skip to main content
16,010,268 members
Home / Discussions / COM
   

COM

 
QuestionPassing/receiving byte-arrays ? Pin
StefanM14-Mar-02 3:22
StefanM14-Mar-02 3:22 
AnswerRe: Passing/receiving byte-arrays ? Pin
pba_14-Mar-02 6:20
pba_14-Mar-02 6:20 
AnswerRe: Passing/receiving byte-arrays ? Pin
Joao Vaz14-Mar-02 6:29
Joao Vaz14-Mar-02 6:29 
AnswerRe: Passing/receiving byte-arrays ? Pin
Rashid Thadha15-Mar-02 5:19
Rashid Thadha15-Mar-02 5:19 
GeneralHlp with CoCreateInstance => Pin
13-Mar-02 20:28
suss13-Mar-02 20:28 
GeneralRe: Hlp with CoCreateInstance => Pin
Deepak Khajuria13-Mar-02 23:14
Deepak Khajuria13-Mar-02 23:14 
GeneralRe: Hlp with CoCreateInstance => Pin
14-Mar-02 2:42
suss14-Mar-02 2:42 
GeneralCreateProcessAsUser : error 1314 Pin
David Dal Zot13-Mar-02 4:00
David Dal Zot13-Mar-02 4:00 
Hi there,

I am trying to switch context within a server. The server is called from an ASP page.
The following code retrieves correctly the client token
but the CreateProcessAsUser fail with error 1314 :
"A required privilege is not held by the client"

the parent account has administrator rights on the local machine. Does he need special privileges like SE_ASSIGNPRIMARYTOKEN_NAME &
SE_INCREASE_QUOTA_NAME ?
the doc say that CreateProcessAsUser enable these privileges automatically. I also uses DCOMCNFG to set impersonation level "delegate", is there a programmatic
way to do this ?

I need help !!

HANDLE hToken,hDup;

CoImpersonateClient();

if ( !OpenThreadToken(
GetCurrentThread(),
TOKEN_ALL_ACCESS ,
FALSE,
&hToken )) {

// openthread error
...
}

CoRevertToSelf();

if ( !DuplicateTokenEx(
hToken,
TOKEN_IMPERSONATE | TOKEN_QUERY |
TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE,
NULL,
SecurityImpersonation,
TokenPrimary,
&hDup
) ) {

// duplicatetoken error
...
}

STARTUPINFO si;
PROCESS_INFORMATION pi;

GetStartupInfo(&si);

if( !CreateProcessAsUser( hDup,
"somecommand",NULL,
NULL,
NULL,
TRUE, NORMAL_PRIORITY_CLASS ,
NULL,
NULL,
&si,
&pi )
)
{
// error
}


Cry | :(( Cry | :(( Cry | :((
GeneralRe: CreateProcessAsUser : error 1314 Pin
pba_14-Mar-02 5:51
pba_14-Mar-02 5:51 
GeneralRe: CreateProcessAsUser : error 1314 Pin
David Dal Zot14-Mar-02 7:21
David Dal Zot14-Mar-02 7:21 
GeneralRe: CreateProcessAsUser : error 1314 Pin
pba_15-Mar-02 8:07
pba_15-Mar-02 8:07 
GeneralException handling when receiving BREAKsignals.. Pin
dejan.n13-Mar-02 0:52
dejan.n13-Mar-02 0:52 
GeneralSmartPointers and COM+ Pin
Ryszard Krakowiak12-Mar-02 1:13
Ryszard Krakowiak12-Mar-02 1:13 
GeneralRe: SmartPointers and COM+ Pin
pba_14-Mar-02 5:43
pba_14-Mar-02 5:43 
Generaltype library not seen in OLE COM Object Viewer Pin
11-Mar-02 19:15
suss11-Mar-02 19:15 
GeneralRe: type library not seen in OLE COM Object Viewer Pin
pba_14-Mar-02 5:22
pba_14-Mar-02 5:22 
GeneralGUID in COM Pin
Leesen11-Mar-02 14:30
Leesen11-Mar-02 14:30 
GeneralRe: GUID in COM Pin
soptest11-Mar-02 15:08
soptest11-Mar-02 15:08 
GeneralRe: GUID in COM Pin
Derek Waters11-Mar-02 15:52
Derek Waters11-Mar-02 15:52 
GeneralTab key not working Pin
manjunatha.s8-Mar-02 20:23
manjunatha.s8-Mar-02 20:23 
GeneralRe: Tab key not working Pin
kakarlamudikrishnarao10-Mar-02 21:10
kakarlamudikrishnarao10-Mar-02 21:10 
GeneralDCOM configuration Pin
pépé6-Mar-02 23:05
pépé6-Mar-02 23:05 
GeneralSingleton COM object doesn't work on Service Pin
prachi6-Mar-02 1:30
prachi6-Mar-02 1:30 
GeneralRe: Singleton COM object doesn't work on Service Pin
soptest9-Mar-02 13:17
soptest9-Mar-02 13:17 
QuestionCOM, DCOM and COM+...? What's the difference? Pin
Tommy Svensson5-Mar-02 2:49
Tommy Svensson5-Mar-02 2:49 

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.