|
|
Comments and Discussions
|
|
 |

|
Hi Martos,
you rock and you made my day
I had exactly the same error and was looking for a solution for days, days and days.
Thanks for your post.
Cheers
Andreas
|
|
|
|

|
I've refered this article.
When "MyActive X Control" inserts at ActiveX Control Pad, errors occur at PED.EXE file.
And then ActiveX Control Pad program dies.
And ActiveX Control Pad downloaded from this article's link.
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!
Program: C:\Program Files\ActiveX Control Pad\PED.EXE
File: f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\winocc.cpp
Line: 318
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
|
|
|
|

|
I have the same problem with ActiveX Control Pad!!
How Can I do with it?
今天没有时间,以后再写吧。
|
|
|
|
|

|
Hi all,
I have an activeX project including some configuration files and license files. These files are included in the inf file and inside the cab. Whenever I call this cab from an HTML page, it looks for the config and license files on my desktop folder. Is there a working directory setting for activeX cab files?
Thanks in advance
|
|
|
|

|
I put the activex control in the dialog (in vc++ 2005).
Everytime I set a new value to either InputParameter or OutputParameter, close the dialog, and open the dialog again, the value I introduced dissapears.
Basically, how can i make these properties to behave as the stock properties? (Meaning they remember when i change the values even if i close the solution and open it again)
|
|
|
|

|
Hi,
very nice article, thanks for it. I would like to ask:
1. Is there any relation between FILEVERSION in resource file and FileVersion in .inf file. These values are different in this article.
2. I tried selfregistration as described in the article with success. But if I unregister ActiveX control manualy I found that .ocx and .inf files were not deleted from C:\windows\Downloaded Program Files. Reregistration of the control from .cab causes creation C:\windows\Downloaded Program Files\CONFLICT.1 directory with previous registration. How can I prevent this? My Idea is to remove previously installed .ocx and .inf in DllUnregisterServer. But how can I do It?
Thanks
-Marian
|
|
|
|

|
Hi,
I tried to build the ActiveX on a XP machine and then register it on Vista
The registration is ok, but when I access it I get an "unspecified error"
Do you have any idea avout it? I even tried to build MFC statically inside my ActiveX but this didn't help
thanks in advance
bye
|
|
|
|

|
try to run cmd.exe as administrator, then run regsvr32 /s myactivex.ocx
|
|
|
|

|
Hello... and let me say thank you for a great tutorial!
I have one question:
I want to return a BYTE* pointer from the ActiveX Control, how can I do that?
I've made this modifications:
//in idl file
[id(1) , helpstring("property OutputParameter1")] BYTE* OutputParameter1;
[id(2) , helpstring("property OutputParameter2")] size_t OutputParameter2;
//in MainDialog.cpp
void CMainDialog::GetVectors(BYTE* &array, size_t &size)
{
array = new BYTE[10];
memset(array, 1, 10);
size = 10;
}
//in MyActiveXCtrl.cpp
// Dispatch map
BEGIN_DISPATCH_MAP(CMyActiveXCtrl, COleControl)
DISP_PROPERTY_NOTIFY_ID(CMyActiveXCtrl, "OutputParameter1", dispidOutputParameter1, pSignatures, OnOutputParameterChanged1, VT_LPSTR)
DISP_PROPERTY_NOTIFY_ID(CMyActiveXCtrl, "OutputParameter2", dispidOutputParameter2, signaturesSize, OnOutputParameterChanged2, VT_INT)
DISP_FUNCTION_ID(CMyActiveXCtrl, "LoadParameter", dispidLoadParameter, LoadParameter, VT_EMPTY, VTS_NONE)
END_DISPATCH_MAP()
void CMyActiveXCtrl::LoadParameter(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
m_MainDialog.GetVectors(this->array, this->size);
// Fire an event to notify web page
FireParameterLoaded();
}
//in MyActiveXCtrl.h
protected:
void OnOutputParameterChanged1(void);
void OnOutputParameterChanged2(void);
void LoadParameter(void);
BYTE* array;
size_t size;
When I debug in JavaScript, I get this errpr when I want to see OutputParameter1:
MyActiveX1.OutputParameter1 Variable uses an Automation type not supported in JScript and when I want to see OutputParameter2 even if the size=10, in Javascript I get 0.
Can you help me please? Thanks
Eusebiu
|
|
|
|

|
I used the same settings for OutputParameters as in tutorial(
DISP_PROPERTY_NOTIFY_ID(CMyActiveXCtrl, "OutputParameter1", dispidOutputParameter1, pSignatures, OnOutputParameterChanged1, VT_BSTR)
[id(1) , helpstring("property OutputParameter1")] BYTE* OutputParameter1;
).
The only thing I did is that I've build the CString variabile after the BYTE* variabile:
//in MainDialog.cpp
void CMainDialog::GetVectors(BYTE* &array, size_t &size)
{
size = 10;
array = new BYTE[10];
memset(array, 65, 10);
array[size + 1] = 0;//add 0 at the end
}
void CMyActiveXCtrl::LoadParameter(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
m_MainDialog.GetVectors(this->array, this->size);
this->pSignatures = CString(this->array);
// Fire an event to notify web page
FireParameterLoaded();
}
In JS I get a string "AAAAAAAAAA" and this is OK!
Eusebiu
|
|
|
|

|
Hi,
I am facing some problem with COM objects.
Let me explain you the application arch in brief:
My Web based application is using ActiveX control (developed in VB) that are built in a CAB file. While accessing this application all the controls downloads into C:\windows\Downloaded Program files\ folder.
This application is working fine on some computers but it is giving odd results into others computers like
1) In some computers I am not able to see controls, only white screen is appearing (“Click to activate and use this control” is appearing into popup).
2) In some computers it is giving ActiveX control can not create object.
Since I am opening up this application from the same source then why I am getting different results into different computers.
Kindly help me in this regards
Thanks in advance
Mahesh P
|
|
|
|

|
I have made a ActiveX control for commericial application.
I need to host the component in Internet Explorer using Java Script.
When the page loads for the first time, the user should be prompted with the drop down menu, when he clicks 'Install ActiveX Control' a A Security Warning dialog box should pop up with controls name on it. When he clicks to install, the component should get registered in the registry.
OS supported are Windows 2000, XP and Vista
IE supported are IE 6 (SP1/2) and IE7
Please suggest Java Script which will do this.
|
|
|
|

|
Hi,
I have the following in the head section of index.html
*****
<OBJECT ID="MyActiveX1" CLASSID="CLSID:2E18D95D-E6A9-491B-A4A4-E043B16C6FBC"></OBJECT>
<script type="text/javascript" src="myexternal.js"> </script>
******
I have no problem accessing MyActiveX1 from index.html, but get an underfined error if I try to do that from myexternal.js
Is there a way out (ex: passing MyActiveX1 as a parameter) ?
Thanks,
Philippe
|
|
|
|

|
Found it: had to force the load of the activeX first
Philippe
|
|
|
|

|
Hi:
I'm trying to to find a way to make an online installer. I have created a setup.exe, and now what I want is to execute it through ie. Someone hinted to use an activexControl to do this, is this possible? how? how can I execute my setup.exe through an activex? Thanks.
|
|
|
|

|
I would like to know also...don't be a jerk...someone please reply to this thread?
|
|
|
|

|
Hi,
Thanx for putting you article on the internet. I am newbee in programming. After following the instruction (partially) in you article my activeX control could work. By partially I mean, I did not implement the section "Building a signed ActiveX Control". But I set the OLESelfRegister value to "\0".
What I am trying to do now is to be able to run the "Webpage with the embbeded ActiveX control" from a flash disk on another computer. The IE browser displays "the red X".
My question now is how could I run the Webpage in my flash disk on any computer?
How is the will the Control register itself on a new computer?
Must I package the control in a cab file? If so, how do I access the cab file when using CODEBASE?
Thanks in advance
Lawrence
|
|
|
|

|
help me pls..i wan to make sure that it can really support animated gif so that i can doing more animation on my appliaction...
|
|
|
|

|
Hi,
first of all thanks for the article!
Then I have a question: I have mine activex control and, thanks to this tutorial, it works good. But what happens if, for example, after some months I find a bug and i want to update it?
I tried on my pc and I saw that, unless I explicitly delete my control from the Windows "Downloaded Program Files" folder, even if on my server the control has changed (I change the version of the control), the client still load the old control.
Any idea?
Thankx in advance!
|
|
|
|

|
You must update version number not only in ActiveX control built with Visual Studio, but also in INF file component of CAB file.
|
|
|
|

|
Thank you very much for your reply.
I have updated the version number in the INF file too.
But the update it's not automatic: to update the activex control I have to right clic on the control in the "Downloaded Program Files" folder and then select "Update".
Is there a way to do this in an automatic way?
Thanks in advance!
|
|
|
|

|
Anyone knows how to automatically update an activex control? I still have that problem.
Thanks in advance.
|
|
|
|

|
Add version to the codebase of the object in the html file.
codebase="http://localhost/myactivex.cab#version=1,0,0,0"
Update the version when there is an update ie:
codebase="http://localhost/myactivex.cab#version=1,0,0,1"
|
|
|
|

|
hi
how can i use Activex control call a lib file or dll file,
and how can i add this lib file to the cab file
|
|
|
|

|
when I complie you source code in vs.2003, it works good.
but when i embed it into the web page, errors occur. The Internet Explorer shut down when it open.
Now , I corrent the code and it works well.
the original code fragement is :
Edit MainDialog.cpp, and add the following code to the
OnCreate method to load and draw the progress bar animated GIF
image: if (m_ProgressBar.Load(MAKEINTRESOURCE(IDR_PROGRESSBAR),_T("GIF")))
m_ProgressBar.Draw();
now , you must replace the previous code to OnInitialDialog Message.
cocainy from China
|
|
|
|

|
When I complie the codes,I meet the same error.But I dont know how to correct it.thanks! Please send me correct codes.My email is renwofei951@hotmail.com
renwofei951 from China
|
|
|
|

|
Thanks!!
I had the same problem (on VS 2003) and I found your suggestion which solved it.
|
|
|
|

|
Hi! It seems that I cannot display the ActiveX image successfully. The ActiveX turns grey in the color. The functions seems ok though...
|
|
|
|

|
1. copy to c:\windows\system32 folder
2. regsvr32 myrecording.ocx
only testing. that's all.
|
|
|
|

|
hi, at the beginning , i have the same error, at last i found that i didn't make the Dailog 's visible property to TRUE ....so , the browser hid the Dialog!!!!
haha~~~ good luck~~~
|
|
|
|

|
Hi, could anyone tell me how to make this ActiveX object run on a machine that does not have VS2005 installed? I have tried to copy some VS2005 related dlls to C:\Windows\system32, but I still cannot register server...
Thanks a lot!!!
|
|
|
|

|
Hi,
I have a problem building MyActiveX project:
(Just before "Creating a Web Page for an ActiveX control")
After the build messages:
- Finished generating code
- Embedding manifest...
I get an error message:
- Project : error PRJ0003 : Error spawning 'cmd.exe'.
It also happens when I compile the full demo project I downloaded.
How can I fix the problem?
Yossi Malka
|
|
|
|

|
I found the solution in the web:
Start/Programs/Microsoft Visual Studio 2005/Tools/Visual Studio Command Prompt
type "path > C:\path.txt"
and copy the path from the created file (C:\path.txt) to the user environment variables.
Yossi Malka
|
|
|
|

|
I have something like this in ocx code: void CFullTestCtrl::StartHDDScan(void) { AFX..... hHDDTestThread = CreateThread(NULL, 0, HDDScanThreadFunc, this, 0, NULL); } DWORD WINAPI HDDScanThreadFunc(LPVOID lpParam) { CFullTestCtrl *ptr2Class = (CFullTestCtrl *)lpParam; for(int i=0; i<10; i++) { ptr2Class -> m_HDDTestStatus = i; ptr2Class -> FireHDDTestStatusChanged(); } return 0; } and in HTML: ... FullTest.StartHDDScan(); ... <script FOR= FullTest EVENT=HDDTestStatusChanged()> { var txt=FullTest.HDDTestStatus; cell = document.getElementById("status"); ..... } </script> And explorer don't catch HDDTestStatusChanged event, ( I tried to move thread function into CFullTestCtrl as a static memmber function , the result was the same). If I move all code from thread function directly to StartHDDScan method IExplorer start to catch it... Can somebody to explain how to do it to catch events from thread function???
|
|
|
|

|
Hey there!
I just had the same problem. There's an article where exactly that situation is being explained:
http://support.microsoft.com/kb/157437
hth!
Andreas Doppelbauer, B.Sc.
|
|
|
|

|
Hi!
I read this article and I'm using your ideas. I want to pass to html page, not only some strings(BSTR), but some objects of my own.
I kind of want to pass some pointers if I am allowed, but I searched and not discovered how.
For exampe, user gives an input, based on that the activex communicates with some servers etc and want to give the user the info requested, in some kind of structure or class or something.
Thank you!
Beyond any sound, beyond any dream...lies the mistery of trance music..
|
|
|
|

|
Hi,
is there a method or function to use GET/POST HTTP method from activex?
Thanks again
Carlo
|
|
|
|

|
Hi all,
I've a problem with Event Queue in my ActiveX Control. I'have generated some method to fire events to javascript. When I call MFC FireEvent (with same eventid) several time javascript function is not called only one time per call but for the number of foregoing calls + 1. I suppose that I must clear the event queue manually but I don't have found any documentation in MSDN...
Thanks for all suggestion
Carlo
|
|
|
|

|
Hi,
does this ActiveX plugin approach work with Mozilla?
Greetings,
Lorenz
|
|
|
|

|
It's not the right question. It should be "Does Mozilla Browser support ActiveX controls?"
|
|
|
|

|
Hi Lorenz2,
mozilla can support activex by "Mozilla ActiveX Project" (now is part of mozilla source tree). This is an extension/plugin for mozilla but is strongly dependent from gecko version. Otherwise to activex, Mozilla support own plugin. You can find all information that you need at:
http://www.iol.ie/~locka/mozilla/mozilla.htm
or
http://www.mozilla.org/projects/plugins/
There are some example to make simple plugins in mozilla/firefox source code at directory:
mozilla/modules/plugin/samples
Cheers Carlo
|
|
|
|

|
Hello
i am getting the folloing error with VC2003....do i miss anything?
error C2664: 'StringCchLengthA' : cannot convert parameter 1 from 'WCHAR *' to 'const char *'
error C2664: 'StringCchCopyA' : cannot convert parameter 1 from 'OLECHAR [128]' to 'char *'
atik
|
|
|
|

|
Change StringCchLength to StringCchLengthW, and StringCchCopy to StringCchCopyW. It will then compile.
|
|
|
|

|
Converting method name from generic to unicode is not a good idea. Setup the project to select unicode method using preprocessor is bettr.
Maruf Maniruzzaman
From Bangladesh
Tomorrow is a blank page
|
|
|
|

|
Build the project with Unicode
|
|
|
|

|
Hello! I have been scratching my head trying to figure out how to set a number of param values which have no published set methods for a third-party ActiveX control. I am trying to host this ActiveX control within my own application. I wonder if you could help. The following is part of the object tag from the web page where the third-party ActiveX control is hosted. <object style="DISPLAY:inline-block" ID="svweb" classid="clsid:B9B2EE1A-E314-4338-A305-BE845EACB112" codebase="control/cswx.cab#version=2,51,2005,715" width="100%" height="350" onreadystatechange="activeXCtrl();"> <param name="size" value="0"> <param name="theme" value="0"> <param name="addr" value="202.9.104.201"> <param name="httpaddr" value="202.9.104.201"> <param name="port" value="81"> <param name="session" value="3b056bb05b7fcf7d3eaeb9ecfcfdbddd59817b838a1bcb4f8f0b5d7a4be71d9c"> ... </object>
|
|
|
|

|
the article is very well compiled. really helpful...
cheers
vikram
vikram sareen
|
|
|
|

|
Hi,
Thats a nice explaination for activex control in .net
Could you please arrange the same in c# /Vb .net and post an article..
I am unable to find the same kind of example in other .net languages.. (specially the event handling parts etc.. which are not available on other lang.)
Thanks
|
|
|
|

|
It helps me a lot to create an ActiveX control and release it.
Thank you for your work!
LuHuiwei
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
This article is intended to help you get up to speed quickly with developing an ActiveX control. It will show you the basic concepts you need to know about ActiveX, such as methods, properties, and events, and how to communicate between an ActiveX control and a web page.
| Type | Article |
| Licence | |
| First Posted | 21 Jun 2006 |
| Views | 671,767 |
| Bookmarked | 378 times |
|
|