|
i fixed the problem. i did not set the setmapmode in the activex control. after setting the setmap mode to himetric i am able to print the activex control. but it is printing with blackbackground. can anybody tell me the problem
|
|
|
|
|
I am printing activex controls. I was not able to print them. Last week i posted the problem in com forum. I found the solution. we have 4 legacy activex controls. out of them i am able to print two of them. One is raising one of the parameter is incorrect and another is printing with black background image. This is my problem. can any one tell where i have to look in the activex control code
|
|
|
|
|
Hi everyone,
I am using Microsoft Comm control ActiveX control in My program.I am not getting How to use that in proper way.Isearched in net i am not getting on VC++.
when i inserted com control into my program Two files are added they are mscomm.cpp and mscomm.h.I dont know the events of mscomm.In vb we have events like
commEvRecv and send.But i am not getting like that events in VC++ please tell me How To do that..I am in tension.Please help me.please give me some VC++ examples or articles in VC++.
Please...
Thanks in Advance,
Savitri.
|
|
|
|
|
Click here ->[^]
its an ATL tutorial and very helpful for you.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
i have a com component exe. the methods exhibited by it are called thru javascript.
when the object is created, the exe is started and methods are called and then exe is exited. this works fine. but sometime the exe does not exit and remains in memory and the webpage calling it hangs.
is there any solution to this problem? is there a method by which i can terminate exe or destroy the object created?
some light on this is highly appreciated
|
|
|
|
|
Where is the application hanging?!
Steve
|
|
|
|
|
I created a simple ATL COM DLL in Visual C++ 6.0. I added a new ATL object and added a new method. The method simply does the following:
STDMETHODIMP CThrowErr::Throw()
{
return Error("Error desc", GetObjectCLSID());
}
I set the project properties to enable exception handling. This DLL compiles without and errors or warnings.
Next I created a new VB6.0 project and added reference to this DLL. Then I created an object of this class and invoked this method. This call is surrounded by On Error goto:
Private Sub Form_Load()
On Error GoTo ex
Dim e As New ThrowErr
e.Throw
Exit Sub
ex:
MsgBox Err.Description
Unload Me
End Sub
I should be seeing Error desc . If I compile and run the binary I get Method '~' of object '~' failed . If I run it in debug I get Method 'Throw' of object 'IThrowErr' failed . If I set a breakpoint on MsgBox Err.Description and watch description I get Automation error Exception occurred.
How can I get the error description to VB? Am I doing something wrong or am I missing something?
Any help would be highly appreciated. Thanks in advance.
|
|
|
|
|
Well I found the answer to this. The ATL object was not supporting the IErrorInfo interface. Once this was fixed the problem went away.
|
|
|
|
|
I need some help on creating a borderless sizable child window. I have been able to do it with the windows WS_SIZEBOX style but would like not to see the border until the mouse pointer moves over the child.
Thanks
Lenny
|
|
|
|
|
And what has it to do with COM ?
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
|
|
|
|
|
hi all,
i am having a COM dll and which is in memory. for unregistering it i use regsvr32 -u 'path'. and loaded the same dll from different location by regsvr32 'newpath'. All this i am doing through code in C++. But when i try to get the module path by calling GetModuleFileName() api it returns me the old path not the newly registered path. So is it because of the old dll is still in memory or something else and if its still in memory how to remove that from memory or am i missing something ???
|
|
|
|
|
sandeepkavade wrote: But when i try to get the module path by calling GetModuleFileName()
How do you call it? I mean, usually you haven't the HINSTANCE of a COM DLL .
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
|
|
|
|
|
i am creating the object using CoCreateInstance(). but before that i am doing all the registeration and unregisteration. Does regsvr32 -u 'path' removes the dll from memory? i think thats what creating all problems?
|
|
|
|
|
sandeepkavade wrote: i am creating the object using CoCreateInstance()
And then how could you use GetModuleFileName ?
sandeepkavade wrote: Does regsvr32 -u 'path' removes the dll from memory?
Nope. Registration means: put this f*ing COM class inside the registry (well, roughly speaking...). After registering a COM component, the COM runtime will load the registered DLL when asked by a client (i.e. whenever the client calls CoCreateInstance for such component).
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
|
|
|
|
|
I am using GetModuleFileName() as fallows.
void GetModulePath(const TCHAR *strModuleName, CString &strModulePath)
{
TCHAR modulePath[_MAX_PATH];
HMODULE hModule = GetModuleHandle(strModuleName);
if( hModule != NULL )
{
GetModuleFileName(hModule, modulePath, _MAX_PATH);
TCHAR* slashPos = _tcsrchr(modulePath, _TCHAR('\\'));
if (slashPos != NULL)
*slashPos = NULL; // Terminate the string here.
strModulePath = CString(modulePath);
}
else
{
// DO ERROR HANDLING HERE
CString strError;
GetErrorText(GetLastError(), strError);
// Log the error;
}
}
|
|
|
|
|
Well it looks correct. Have you checked corrensponding registry entries?
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
|
|
|
|
|
Sorry for delayed reply. As per your suggestion i checked the registry entries but i havent seen any problems in that they are getting updated before and after unregistering/registering.
|
|
|
|
|
Can't you include some debugging info (i.e. output to debugger, to file, ...) in your COM DLL to distinguish between the two ones at runtime?
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
|
|
|
|
|
Yps, i am running debug viewer and the logs say that its refering to the old path.
|
|
|
|
|
Hence you have loaded object path conflicting with registry one?
I'm sorry but can only suggest you using Oleview tool to get additional info.
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
|
|
|
|
|
HI All
Please see my code and explain to me how memory increase after DrainOUTQueue called.
Thnks
while (fKeepLooping && bKeepThread)
{
//Reset the number of queued items
ulNoOfQueuedItems = 0;
//Check to see if there is any data in the out queue
IfFailHrGo(m_piOUTEndpointUSB->DrainOUTQueue(0, &ulNoOfQueuedItems, NULL)); <-- HERE
if (0 == ulNoOfQueuedItems)
{
if (fKeepLooping)
{
::Sleep(lTimeInterval);
}
}
else{....}
}
xuanthinh
|
|
|
|
|
I have a browser which is developed into win32 using IWebBrowser2 interface.
I created one html login page in html which contain username and password text boxes and submit button.
When i click on submit button i need to verify the username and password from windows registry.
So i created one function which is get called after submit button click.
The funtion which retrive the username and password from windows registry.
But i am unable to get the HTML text box contain.
Can anybody tell me how to take and pass the html text box contain into the function which is
get callled after submit button click.
Sorry for the bad english.
Thanks in advance.
|
|
|
|
|
Now a days I am experementing with this. As per my investigation you have to get the document of your browser, you can achieve this through the IDispatch interface. As soon as you get this ask for HTMLDocument2 interface, then enumerate the TML elements through IHTMLElementCollection interface. Now count the number of elements by get_length method of IHTMLElementCollection . Here you go get IDispatch again through IHTMLElementCollection, remeber you are now in a loop enumerating each element so you need IHTMLElement interface which will be avaialble when you query through the dispatch pointer.
Now get tag name through get_tagName of IHTMLElement, you are near about your goal. get the text & button element IHTMLInputTextElement & IHTMLInputButtonElement interface. Finally get the html text using get_name.
Have a nice day.
|
|
|
|
|
Hello all,
I am very new to COM. I am good at C++, now i need to write some applications using C++ COM. Can any one suggest me a good book or site
where i can learn COM programming quickly.
|
|
|
|
|