|
I followed ur article..
and developed a ATL project.. in VS2005
that fires an event as ur Totalmarks using Fire_Totalmarks.
i need to use activeX object in Javascript
I called this activeX from javascript..
properties and function calles are doing fine..
but event does not work... either it is not invoked or caught
then i used ur SimpleAtlCom ATL project.. ..
but i didnt work too..
is there a problem in my javascript code.. or .. developing ATL project...??
Here is the activeX object declaration and event handle
alert('here');
<object id="SIMPLE" classid="clsid:{27BF0027-BECC-4847-AF91-99652BCE9791}">
-- Nahian
-- modified at 0:29 Monday 16th July, 2007
|
|
|
|
|
i have know idea about javascript so can't help!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
Hi,
I have created a simple ATL 3.0 Composite Control. However, when I register it manually and then embed it in my web page (html) , it displays the control and when I unregister it and access the web page it doesn't show the control .
My question is, is it not that the ATL control is self registering control? Or do I need to register it with some code??
If so please let me know about it ....
Do I have to do any additional coding to enale accessing of control through client web pages when I host it in the server??
thank you.
Regards,
Srikanth
|
|
|
|
|
Hi.
Could you show us the exact same thing, but with another exportable ATL component (for example, IComplexObj) that would have a SimpleObj as a member property, and that would also be usable in a vb/vba code ?
I have a very hard time doing that...
|
|
|
|
|
Hello Mr ThatAlok and Thank you for your article I have a question or better have an error Im tring to making a project step by step with your article but on figure 11 when Im clicking on Add Connection Point or Impelement Interface and select my Interface of left listbox to right listbox and click finish I cant see CProxy_(that is my interface) or better I said wizard dosen't make this class How can I solve this problem (Im using vs2003)
Thanks
|
|
|
|
|
messages wrote: How can I solve this problem (Im using vs2003)
i have implemented this project with VS6 in my mind.. but i will check it on Vs2003 and revert back withthe answer soon!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
I thankful and Im wating for your answer I have many problem with atl articles because they are for VC6.0
Thanks
|
|
|
|
|
Hello sir..,
I got error in vb project like "Active X control is not created" when i run the project.....I have fully obey this code but still not able to get output
Please help me .....Waiting for reply....
Thank you for reading this message
alpa shah
|
|
|
|
|
alpa shah wrote: I got error in vb project like "Active X control is not created" when i run the project.....I have fully obey this code but still not able to get output
seems problem with dll!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
I need the reply soon.
pls send it quickly.
My email id is tinapatel29@yahoo.com
thanx
Tina
|
|
|
|
|
xdeveloper_del wrote: How to send ATLDLL to VBA(Visual Basic Application )?
[Click for User Profile] xdeveloper_del 1hr 54mins ago
I need the reply soon.
pls send it quickly.
Will CreateObject() help?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
_ISimpleObjEvents is not displayed as an interface, and is only displayed as a class, so I can't automatically add the "Void TOTAL([in]short marks)" method to the interface. How should the second part be done in VS2005?
|
|
|
|
|
gilzig wrote: How should the second part be done in VS2005?
I havn't seen VS2005 yet, when ever i got my hand on it.. definately there will new article posted on same topic for vs2005 users
|
|
|
|
|
_ISimpleObjEvents as an interface can be found under SIMPLEATLCOMLib (click to expand the node). Hope that helps.
-- modified at 5:27 Friday 15th December, 2006
|
|
|
|
|
Can you return different value besides S_OK?
I'm trying to return other numbers like S_FALSE or another postive numbers like 2 or 3. I'm getting a zero value from the visual basic application. Thanks
Danny
Danny
|
|
|
|
|
chaoticSilence wrote: I'm trying to return other numbers like S_FALSE or another postive numbers like 2 or 3. I'm getting a zero value from the visual basic application.
I am Lil Confused! i want to how are you checking return value in Visual Basic Component! could you show me both Visual C++ function and Visual Basic Application code snippet!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Alok, Sorry for the confusion, I haven't really developed in ATL before. I used Visual C++ 6 to create my ATL DLL. This is basically wrapper around some of my code so I can access it from a Visual Basic code
Here is snippet one of my interface implementation
STDMETHODIMP CTagger::Read(int startAddr, int numOfBytes, BSTR* data)
{
// I do my work
CString tempData;
if( m_ioRdr.Read(startAddr,numOfBytes, tempData) < 0)
{
//I clean up my code here
// not shown here
return FAIL; // FAIL is -1
}
*data = tempData.AllocSysString();
return S_OK;
}
Here is a snippet of VB
Dim myTag As Object
Set myTag = CreateObject("CIMTagger.Tagger")
Dim rtnCode as Integer
Dim rtnData as String
rtnCode = myTag.Read(0,8,rtnData)
if rtnCode < 0
' I display the error code and exit
End IF
The issue is I keep getting 0 for my rtnCode in Visual Basic even when there is an error. So I wasn't sure how to check rtnCode in the vb app. I was just thinking about making my interface signature the following
Read(int startAddr, int numOfBytes, BSTR* data, int* rtnCode)
I appreciate any feedback.
|
|
|
|
|
chaoticSilence wrote: STDMETHODIMP CTagger::Read(int startAddr, int numOfBytes, BSTR* data)
actaully if you want to return some value from the atl function, then your method defination in the idl file should be like this
Read([in]int startAddr,[in]int numOfBytes,[out]BSTR* data,[out,<code>retval</code>]int nRet)
this will be correct way of returing error code from the ATL DLL
........
[ot] I am on leave from tommorow for next 7-9 days... if still some problem persist or you can't able to understand above,then you have to wait till feb for further reply!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
-- modified at 1:23 Sunday 26th February, 2006
|
|
|
|
|
Hi Alok,
i got struck with your 20th step. i guess.
when i compile i get a error message
D:\VC++\SimpleAtlCom\SimpleObj.cpp(61) : error C2039: 'Fire_TotalMarks' : is not a member of 'CSimpleObj'
d:\vc++\simpleatlcom\simpleobj.h(11) : see declaration of 'CSimpleObj'
Generating Code...
Error executing cl.exe.
SimpleAtlCom.dll - 1 error(s), 0 warning(s)
so i placed the code
void Fire_TotalMarks(long TotalMarks);
in CProxy_ISimpleObjEvents class header file.
i got the following message..
Linking...
Creating library Debug/SimpleAtlCom.lib and object Debug/SimpleAtlCom.exp
SimpleObj.obj : error LNK2001: unresolved external symbol "public: void __thiscall CSimpleObj::Fire_TotalMarks(long)" (?Fire_TotalMarks@CSimpleObj@@QAEXJ@Z)
Debug/SimpleAtlCom.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
SimpleAtlCom.dll - 2 error(s), 0 warning(s)
then i place the code
void Fire_TotalMarks(long TotalMarks);
in SimpleObj class header file.
i got the following message
Linking...
Creating library Debug/SimpleAtlCom.lib and object Debug/SimpleAtlCom.exp
SimpleObj.obj : error LNK2001: unresolved external symbol "public: void __thiscall CSimpleObj::Fire_TotalMarks(long)" (?Fire_TotalMarks@CSimpleObj@@QAEXJ@Z)
Debug/SimpleAtlCom.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
SimpleAtlCom.dll - 2 error(s), 0 warning(s)
can you tell me what is the problem...
-- modified at 1:41 Friday 30th December, 2005
|
|
|
|
|
Sorry man. It's working....
|
|
|
|
|
senproin wrote: Sorry man. It's working....
noprobs, you are always welcome
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
But as you guide says, step 20, it shuldn´t create automatically the function "VOID Fire_TotalMarks(SHORT TotalMarks)..." ?
Why, in my case, it was not created.
Coping the function from your project does the work.
So for making from scratch something is missing.
I am very interested on this.
Your article is very good.
Congratulations
Miguel
|
|
|
|
|
Hello,
I was trying to implement this code in my system. But i am not able to do it. Might be silly mistakes but cant figure it out.Plewase help. I am a newbie to this field
THis is the error i am getting..
Compiling...
SimpleAtlCom.cpp
E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : error C2065: 'IID__ISimpleObjEvents' : undeclared identifier
E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : error C2440: 'static_cast' : cannot convert from 'class CSimpleObj *' to 'class ATL::_ICPLocator *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : fatal error C1903: unable to recover from previous error(s); stopping compilation
SimpleObj.cpp
E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : error C2065: 'IID__ISimpleObjEvents' : undeclared identifier
E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : error C2440: 'static_cast' : cannot convert from 'class CSimpleObj *' to 'class ATL::_ICPLocator *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Generating Code...
Error executing cl.exe.
SimpleAtlCom.dll - 6 error(s), 0 warning(s)
Dileep
|
|
|
|
|
Dileep_kerala wrote: E:\VC Study Examples\COM_ATL\SimpleAtlCom\SimpleObj.h(34) : error C2065: 'IID__ISimpleObjEvents' : undeclared identifier
I believe you have tried above article by your own .. thats nice.. any Way just convert 'IID__ISimpleObjEvents' to 'DIID__ISimpleObjEvents' in Class Header File.
Dileep_kerala wrote: Might be silly mistakes but cant figure it out.
Hai.. No Probs Buddy...
you are always welcome
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thank you very much for this article! You have no idea how much it helped me out.
Anyway, I ran into this problem too. Why didnt visual studio put in the correct name? And where is the definition for "DIID__ISimpleObjEvents"
thanks again
DrDataRulz.net
|
|
|
|