Click here to Skip to main content
15,902,198 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Program location in memory Pin
Hydralisk1-Sep-03 14:53
Hydralisk1-Sep-03 14:53 
GeneralRe: Program location in memory Pin
Baatezu_Not_Signed_In1-Sep-03 15:54
sussBaatezu_Not_Signed_In1-Sep-03 15:54 
GeneralRe: Program location in memory Pin
David Crow2-Sep-03 3:35
David Crow2-Sep-03 3:35 
Generalafter much googling and msdning Pin
(Steven Hicks)n+11-Sep-03 10:52
(Steven Hicks)n+11-Sep-03 10:52 
GeneralRe: after much googling and msdning Pin
KaЯl1-Sep-03 12:07
KaЯl1-Sep-03 12:07 
GeneralRe: after much googling and msdning Pin
(Steven Hicks)n+11-Sep-03 13:02
(Steven Hicks)n+11-Sep-03 13:02 
Generalinterrupt handling in win2k Pin
Member 5562471-Sep-03 10:10
Member 5562471-Sep-03 10:10 
GeneralInvoking Task Scheduler Wizard through API Pin
insanely4201-Sep-03 9:23
insanely4201-Sep-03 9:23 
Greetings

I have a command line tool and I want to provide a GUI interface to schedule the tool to perform its job. Now the problem is how do you I invoke the Query Interface wizard thru API? I can create a test sample job using the following code but I am unable to start the wizard so that the user can set it times directly thru my app.

Thanks in advance.

ITaskScheduler * sITS;

HRESULT InitTSAPI()
{
HRESULT hr = S_OK;

_ASSERTE ( SUCCEEDED(CoInitialize(NULL)) ); // init COM

if (SUCCEEDED(hr)) {

hr = CoCreateInstance(CLSID_CTaskScheduler, NULL, CLSCTX_INPROC_SERVER, IID_ITaskScheduler, (void **) &sITS);

if (FAILED(hr)) {
return hr;
CoUninitialize();
}
}

return hr;

}

HRESULT CreateTask ( WCHAR * pTaskName )
{

HRESULT hr = S_OK;
ITask * task = 0;
IPersistFile * pFile = 0;

hr = sITS->NewWorkItem( pTaskName, CLSID_CTask, IID_ITask, (IUnknown**)&task );

if ( FAILED ( hr ))
return hr;

hr = task->QueryInterface(IID_IPersistFile, (void **)&pFile);
task->Release();

hr = pFile->Save ( NULL, TRUE);
_ASSERTE ( SUCCEEDED ( hr ));

pFile->Release();
return S_OK;

}

void main()
{

InitTSAPI();
CreateTask(L"Test Task");

sITS->Release();

}

GeneralA GUI Question Pin
Anonymous1-Sep-03 9:14
Anonymous1-Sep-03 9:14 
GeneralRe: A GUI Question Pin
Michael Dunn1-Sep-03 10:14
sitebuilderMichael Dunn1-Sep-03 10:14 
GeneralRe: A GUI Question Pin
lpRomang1-Sep-03 11:07
lpRomang1-Sep-03 11:07 
GeneralRe: A GUI Question Pin
mike :D1-Sep-03 11:44
mike :D1-Sep-03 11:44 
GeneralRe: A GUI Question Pin
David Crow2-Sep-03 3:38
David Crow2-Sep-03 3:38 
GeneralRe: A GUI Question Pin
cmk2-Sep-03 8:23
cmk2-Sep-03 8:23 
GeneralCreateFile and binary files Pin
Cannibal1-Sep-03 8:36
Cannibal1-Sep-03 8:36 
GeneralRe: CreateFile and binary files Pin
Stefan Pedersen1-Sep-03 10:30
Stefan Pedersen1-Sep-03 10:30 
GeneralFFT for dummies Pin
Steve Messer1-Sep-03 8:14
Steve Messer1-Sep-03 8:14 
GeneralRe: FFT for dummies Pin
Joaquín M López Muñoz1-Sep-03 11:16
Joaquín M López Muñoz1-Sep-03 11:16 
GeneralRe: FFT for dummies Pin
Anonymous1-Sep-03 11:50
Anonymous1-Sep-03 11:50 
GeneralRe: FFT for dummies Pin
mr20031-Sep-03 13:27
mr20031-Sep-03 13:27 
GeneralRe: FFT for dummies Pin
Steve Messer1-Sep-03 21:26
Steve Messer1-Sep-03 21:26 
GeneralRe: FFT for dummies Pin
Joaquín M López Muñoz1-Sep-03 22:14
Joaquín M López Muñoz1-Sep-03 22:14 
GeneralRe: FFT for dummies Pin
Steve Messer2-Sep-03 6:21
Steve Messer2-Sep-03 6:21 
GeneralRe: FFT for dummies Pin
Joaquín M López Muñoz2-Sep-03 7:02
Joaquín M López Muñoz2-Sep-03 7:02 
GeneralRe: FFT for dummies Pin
Steve Messer2-Sep-03 7:58
Steve Messer2-Sep-03 7:58 

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.