|
The API is for Windows CE and Windows Mobile.
You cannot use it for Win32 or x64.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Are you coding for windows CE / Pocket PC ?
|
|
|
|
|
Yes i m coding for Pocket pc but use on Win32 or x64.
Actually i have created a code that is access the windows based mobile and send sms thru this with using of my application.
everything is working fine.
for sending msg i m using RAPI function and use CeCreateProcess .
but when i continous sending message than the phone memory is full and the phone and the exe both are looking hanged, so i want to release the memory of phone after each CeCreateProcess or each msg sending.
please help me for this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: Yes i m coding for Pocket pc but use on Win32 or x64.
And I guess you have installed Windows Mobile SDK? If so that lib comes with the SDK. isnt it?
|
|
|
|
|
Yes , i have installed it ,and include aygshell.lib include from project property window.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Then whats the problem in using it?
|
|
|
|
|
It give this error
error LNK2019: unresolved external symbol _SHCloseApps referenced in function "public: void __thiscall CTestDlg::Test_Function(void)" (?Test_Function@TestDlgg@@QAEXXZ)
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
And have you specified the aygshell.lib in the addition dependency column of project settings("project settings->liner->Input->addition dependencies")
|
|
|
|
|
Yes.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Please tell me now what can i do?
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Dear Mr/Ms
Now I have one problem. Pls help me.
I create one process(Temp.exe) and set affinity is CPU 0, in this process, can I create other thread with affinity is CPU 1?
(I already using SetThreadAffinityMask but error raised ERROR_INVALID_PARAMETER)
(OS :WinXP, Core 2 Duo CPUs)
This is my code:
pls help me.
//Create Process with CPU 2 (all thread of this process run in CPU 2)
BOOL result = CreateProcess(NULL,_T("C:\\CPU.exe"),NULL,NULL,FALSE,NORMAL_PRIORITY_CLASS,NULL,NULL,&si,&pi);
SetProcessAffinityMask (pi.hProcess,2L);
in CPU.exe when press button [Check]
HANDLE hThread;
DWORD dum;
hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)threadFunction,NULL,0,&dum);
// but i want this thread run in CPU1 not CPU2
DWORD dWord = SetThreadAffinityMask (hThread,1L); // threadFunction run in CPU 1
// dWord = 0 : raise error, canot set affinity for this thread
Pls help me more information about it.
|
|
|
|
|
Thread affinity can only be a subset of the process affinity.
You would probably be able do do this if you set the process affinity to 3.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
thanks you so murch.
i understood.
because my project have all thread (Thread 1,2,3...) of this process run on CPU 1, except specical (Thread 10,50) thread will run on CPU 2.
Can you give me other solution?
|
|
|
|
|
You could set the process affinity to 3 and then set the thread affinity for each thread to 1 or 2 as needed.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hello,
I would know please how can i validate an xml file (input of my code ) compared to xsd file (Validating with noNamespaceSchemaLocation).
If there is some code example it will be more helpful.
Thank you.
|
|
|
|
|
I don't know if such a thing exist, but on the other hand, you can approach it differently: you could use a tool that generates C++ classes out of from your xsd file and then try to read an xml file using that library. If this fails, it means that your xml doesn't respect the xsd file.
Take for instance a look at CodeSynthesis XSD[^] (which is open source).
|
|
|
|
|
Either libxml or msxml[^] can be used for this (although as far as I'm aware, libxml doesn't 100% cover the XSD spec - but it's probably good enough). The msxml link gives a link to example code - here's a rough run-through of loading and validating a document with libxml:
xmlDocPtr doc_ = xmlReadFile(fileName, 0, XSLT_PARSE_OPTIONS);
xmlSchemaParserCtxtPtr ctxt = xmlSchemaNewParserCtxt(schemaFileName);
xmlSchemaPtr schema = xmlSchemaParse(ctxt);
xmlSchemaFreeParserCtxt(ctxt);
xmlSchemaValidCtxtPtr context = xmlSchemaNewValidCtxt(schema);
if (0 == xmlSchemaValidateDoc(context, doc_))
{
}
else
{
}
xmlSchemaFreeValidCtxt(context);
xmlSchemaFree(schema);
xmlFreeDoc(doc_);
There's no error checking apart from the schema validation, so you would want to add that.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
thanks but can you tell me what included file should i do and what is necessary to use xmlDocPtr and xmlSchemaParserCtxtPtr...
|
|
|
|
|
khaliloenit wrote: what included file should i do
For the code I posted, tree.h, parser.h and xmlschemas.h, all from libxml[^].
khaliloenit wrote: what is necessary to use xmlDocPtr and xmlSchemaParserCtxtPtr...
It's necessary that you understand how to use libxml. There are developer docs[^] and code samples[^] available that cover most things you might want to do with libxml, as well as plenty of tutorials on t'Internet[^].
The code I gave you is sufficient to read an XML file, read a schema and validate the XML file using the schema - what you do with the XML file after that is your problem.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello,
I am trying to embed htmlview into dialog.I used this code below.Application is crashed when window type is child.Not crashing for overlapped or popup. How can ı solve this issue?
RECT rc;
GetClientRect(&rc);
CFrameWnd * pfrm = (CFrameWnd*) RUNTIME_CLASS(CFrameWnd)->CreateObject();
pfrm->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, rc, this);
CCreateContext pContext;
pContext.m_pNewViewClass = RUNTIME_CLASS(CHtmlView);
CHtmlView *pView = (CHtmlView *) pfrm->CreateView(&pContext);
if(!pView)
{
return FALSE;
}
pView->Navigate(htmlFilePath);
|
|
|
|
|
You should be using the Web Browser ActiveX control instead of CHtmlView .
Its really very simple.
Place the ActiveX control in the dialog, associate a variable with it and simply call its methods.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Thanks a lot Superman.It is clean and easy solution.
|
|
|
|
|
I want a list of functions of library windows.h and winsock2.h - I can't find them on msdn.
Please help me!
|
|
|
|
|
Can't you simply have a look at the files (you know, function prototypes are there...)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Why? Usually you trace in the other direction - "I want to use some_function - what header is it declared in?".
One way to do it, though, would be to pre-process Windows.h. Here's a command-line that does that and uses grep to strip out the (many, many) blank lines (the resulting file still contains almost 65000 lines...). It assumes that I've changed directory to one containing Windows.h, obviously:
cl /TC /EP Windows.h | grep -v "^\s*$" > file_name
You could do a similar thing for winsock2.h
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|