Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to call NewWorkItem (COM) in C

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am trying to use NewWorkItem to scheduler a task in MS scheduler for windows 2000/XP.

The below code works for C++ but I get an error saying:
"NewWorkItem' : is not a member of 'ITaskScheduler'" when I try to use it in C.

hres = pITS->NewWorkItem(&pwszTaskName, // Name of task
&CLSID_CTask, // Class identifier
&IID_ITask, // Interface identifier
(IUnknown**)&pITask); // Address of task interface


I am a C++ programmer and new to the ways of C-world. Please help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top