|
Hi,
I am using Web Browser Control (IWebBrowser2) in C++ and renders a html page in it. In my html page I have a tree view control. I want a pointer to this tree view control (embedded in html page) in my C++ code. How would I get the pointer to this tree view control.
Any help would be appreciated.
Regards,
Paresh.
|
|
|
|
|
I want to built a DLL in which we can pass parameters to call a jar file and the return values of the Jar file should be available to the calling application.
Do anyone know How to perform this ?
Thanks in advance.
Nikhs
Nikhil Trivedi
|
|
|
|
|
Nikhil Trivedi wrote: ...pass parameters to call a jar file...
What do you mean by "call a jar file?"
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: What do you mean by "call a jar file?
I meant to say that I want to unpack(Execute) a jar file from visual C++ app. and then get the result in the visual c++ for furthur processing. Suppose I am using jar file to generate an auth. number by passing a variable to the jar file, and want the auth number back in the visual c++ app. so that I can process it according to my requirement.
Thanks for your answer.
Nikhs
Nikhil Trivedi
|
|
|
|
|
Nikhil Trivedi wrote: I meant to say that I want to unpack(Execute) a jar file from visual C++ app. and then get the result in the visual c++ for furthur processing.
Use CreateProcess() for this.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi everyone! good day!
i just wanted to ask whats the difference between declaring a variable like this
TEST* pTest;
with
LPTEST pTest; // see code below
typedef struct
{
...
} TEST, *LPTEST;
thanks!
newbie
|
|
|
|
|
there's none... because LPTEST is just a synonym for being a pointer to a TEST .
but for readability reasons, i prefer using the TEST* notation
|
|
|
|
|
toxcct wrote: lisibility
Frenglish for "readability", huh tox'? From the french word "lire"?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
oh sh*t ! rotfl, you're damn right... i'm changing it immediately !
|
|
|
|
|
It was good though, it made me laugh as well.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
tnx a lot for the answers!
great help!
newbie
|
|
|
|
|
They are the same, basically it's only the MS way to fight the pointer notation fear...
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.
|
|
|
|
|
Hello,
im like to use more stl library as before, and therefore i need some help from the comunity
for better understanding how they work!
Ok, i know now how to use vectors, loop over them and serch in them.
Now i need to know more about maps, i try to make my map but i recive an error!
This is my try:
map<string, CMyObject>NewMap;
but this is not the right way , how to make my own map?
I found an example with two params, but in the MSDN is a samle with 4 params!?
Thanks for help!
termal
-- modified at 4:48 Friday 4th May, 2007
|
|
|
|
|
termal wrote: but this is not the right way
yes it is...
what error are you getting exactly ?
is it at compile time or runtime ?
|
|
|
|
|
The third and fourth parameter to std::map are optional. Is your CMyObject class assignable and copyable?
|
|
|
|
|
hi
i seeking an easy way to send email in a windows32 application
sepel
|
|
|
|
|
Have a look at Nish's article here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
|
See here and here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I am new to eVC, I want to know how can I compile eVC++ project using NMAKE
or equivalent for eVC++ project.How can i write a batch file to do so?
thanks in advance.
-- modified at 3:50 Friday 4th May, 2007
priyank
|
|
|
|
|
Hello everybody,
I am actually migrating an existing project from VC6 to VC2005. I had a problem with an ActiveX component that wasn't loading at runtime, all other components were loading except the ActiveX. I dug in more and found out that the SplitDialogTemplate() function of the atlwin.h in VC6 differs a lot from the same function in VC2005.
In VC6 it copies all the components (OLE and non-OLE), while in VC2005 it only copies the non-OLE components. Does anyone know any turnaround that can help me load the ActiveX component?
This is the piece of the code that calls SplitDialogTemplate();
HGLOBAL hResource = LoadResource(hInstResource, hDlg);
DLGTEMPLATE* pDlg = (DLGTEMPLATE*)LockResource(hResource);
LPCDLGTEMPLATE lpDialogTemplate = SplitDialogTemplate(pDlg, pInitData);
HINSTANCE hInst = _Module.GetModuleInstance();
nRet = ::DialogBoxIndirectParamA(hInst, lpDialogTemplate, hWndParent,
pDialogProc, dwInitParam);
if (lpDialogTemplate != pDlg)
GlobalFree(GlobalHandle(lpDialogTemplate));
UnlockResource(hResource);
FreeResource(hResource);
Thank you in advance,
Ray
|
|
|
|
|
Hi!
In my application I am using multithreading.
for that I have used the loop.
HANDLE hThread[3];
<br />
for(int i=0;i<3;i++)<br />
{<br />
hThread[i]=(HANDLE)_beginthreadex(NULL, 0, &Thread ,l,NULL, &threadID);<br />
}<br />
<br />
<br />
unsigned __stdcall Thread(void* pArguments )<br />
{<br />
HRESULT hr=NULL;<br />
struct argument_list *Lparam= (argument_list *)pArguments ;<br />
Package pkg;<br />
threadID++;<br />
<br />
DWORD dw=WaitForMultipleObjects(ListBoxItemCount,hThread,TRUE,5000 ); <br />
<br />
switch (dw)<br />
{ <br />
case WAIT_OBJECT_0 + 0:<br />
hr=pkg.EncodeMediaContent(Lparam->pszInFile,Lparam->pszOutFil,Lparam->hwndParent,Lparam->Host,Lparam->UserID,Lparam->InitPackageRequest,Lparam->ScriptFile,Lparam->Port,Lparam->hList,Lparam->_ProtectSet,Lparam->hWndinoutfiledir,Lparam->hwndEncrypt); <br />
break;<br />
<br />
case WAIT_OBJECT_0 + 1:<br />
hr=pkg.EncodeMediaContent(Lparam->pszInFile,Lparam->pszOutFil,Lparam->hwndParent,Lparam->Host,Lparam->UserID,Lparam->InitPackageRequest,Lparam->ScriptFile,Lparam->Port,Lparam->hList,Lparam->_ProtectSet,Lparam->hWndinoutfiledir,Lparam->hwndEncrypt); <br />
break;<br />
<br />
case WAIT_OBJECT_0 + 2:<br />
hr=pkg.EncodeMediaContent(Lparam->pszInFile,Lparam->pszOutFil,Lparam->hwndParent,Lparam->Host,Lparam->UserID,Lparam->InitPackageRequest,Lparam->ScriptFile,Lparam->Port,Lparam->hList,Lparam->_ProtectSet,Lparam->hWndinoutfiledir,Lparam->hwndEncrypt); <br />
break;<br />
<br />
case WAIT_FAILED:<br />
break;<br />
<br />
case WAIT_TIMEOUT:<br />
break;<br />
} <br />
if(hr==S_OK)<br />
{ <br />
MessageBox(0,L"thread gone finished" ,L"therad",0);<br />
_endthreadex( 0 ); <br />
}<br />
threadID--;<br />
return 0;<br />
}
how these worker thread works and how they will run.
means ,how can i identified that which thread work at hThread[threadID/*it is Relevant with i */ ],
1)I have to wait/stop the main thread until the work threads finished his task.
2)when can all thread start. or will it start immidate at the loop time or first it will create all. then it start ?
becuse in my application when i debug some started with loop and some afterwards.
-- modified at 7:09 Friday 4th May, 2007
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
Hi!
The threads are all created in the loop.
However they are created in a suspended state. The scheduler of the operating sytem will activate them (put them in running state) according to their priority and overall system load.
Usually this will be in the order you create the threads.
In prinzipal using a static (global) variable as a thread counter is a good idea.
But I strongly recommend to put the access to this variable into a critical section just for the case that the read and write operation (and whatever you will add in future) is not atomic.
Since the worker threads are identical clones it does not matter if the creation sequence would deviate from the sequence the threads start. However, if you want to know the creation sequence in the thread, you can just pass your loop index i as parameter.
kind regards
Leo
|
|
|
|
|
thanks !
but now i am in big confusion here.i have used array of handle right!
now runtime which handle will comes at which stage how can i know that?
becuse
hThread[0]=....
hThread[1]=....
hThread[2]=....
hThread[3]=....
and at WaitForMultipleObjects(ListBoxItemCount,hThread,TRUE,0);
we write only the base hThread address the how the thread identified. by system.
hThread[i], i think it was my wrong idea , because after then it gives me the constant handle error ,
anyways I just want to know why the above method fail.
"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
OK, I'm no specialist for WaitObject.
And I still do not understand what the code is intended for.
But lets start from the beginning.
You are creating 3 threads (thread 0 to thread 2)
While you have hardcoded the three in the loop index you use the variable ListBoxItemCount in the thread.
Looking at your previous answer you say hThread[0] ... hThread[3].
How much is ListBoxItemCount?
Because hThread[3] is never initialized.
In the way the code is now, it could happen that a task switch occurs in the thread starting loop, after one or two threads where created. In this case the Wait function must fail because not all thread handles in the list are initialized.
I understand that this is only a sample code to demonstrate your problem. But I have also doubts that you are going in the right direction. It is very likely, that if you change your design, the code that troubles you will disappear.
Greets
Leo
|
|
|
|
|