Link to home
Create AccountLog in
Avatar of JeeStar
JeeStarFlag for India

asked on

How to create ActiveX Control for Internet Explorer to read and write files in hard drive?

Hi,

My Requirement:
I'm developing Intranet Application for company internal use. in this one the module (ActiveX) says read and write files from all the terminals in the company.

Development language for this module: VC++

Help: how to develop this activex controls? please guide me.

Thanks in advance.
Avatar of JohnGaby
JohnGaby
Flag of Afghanistan image

Did you look at the ATL tutorial that I suggested in your previous post?

http://msdn.microsoft.com/en-us/library/599w5e7x(VS.80).aspx
Avatar of JeeStar

ASKER

Hi JohnGaby,

ya i read that. with the help of that tutorial i have created that ploygon and included my custom methods also.
But issue is while i'm trying to create that activex  object using javascript, i'm getting following error "Automation server can't create object."
Thats why i posted question again with create description

Thanks a lot that toturial, please guide me to create this control because i have less time to complete my requirment. coming friday EOD is QA realese.

Can this be a problem with your JavaScript code? I'd suggest using something like this to test if the ActiveX is registered and all:

var obj = new ActiveXObject("MyServer.MyControl");
if(obg==null)
    alert('Error');

If the ActiveX is registered properly, naturally no error will occur. Then the problem is probably in the way your JavaScript code creates the contriol, double-check that.

Also, note that accessing files from ActiveX won't work properly in Vista due to lack of access rights.
ASKER CERTIFIED SOLUTION
Avatar of JohnGaby
JohnGaby
Flag of Afghanistan image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of JeeStar

ASKER

Hi Gurudenis,

Thanks for information.
ya you are right, my activex is not registered properly. i juts altered my code little bit now its working in IE 6.0, but IE 7 is not working. please tell me what i have to do for IE 7.
What is happening when you try and use int in IE 7?  Are you running Vista with UAC turned on?
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of JeeStar

ASKER

Hi JhonGaby / Gurudenis,

i'm using two system for this requirement
1. Win XP SP3 with IE7
2. Win XP SP2 with IE 6

Actually i'm referring JohnGaby mentioned msdn url. i'm doing modification for that.  thanks for your support guys. if i stuck again i will get help from you guys.

Thanks a lot.
>> Win XP SP3 with IE7
You'll need IE 7 or later with Vista in order to test what's described in JohnGaby's link. It's only relevant to Vista.
Avatar of JeeStar

ASKER

Hi JhonGaby / Gurudenis,

Thanks a lot man. i hope i finish my requirement by tonight.
Avatar of JeeStar

ASKER

Hi Gurudenis,

ok, i'm not using Vista. how to solve this issue in Win XP SP3 with IE 7.
The UAC issue is simply not present in XP. Something else must be wrong. Can you describe what exactly fails, and how?
Avatar of JeeStar

ASKER

Hi Gurudenis,

this is an error message in IE 7. .Net Web Application running, whenever i click the send files button its fails error message is ActiveX control "Initialization failed".

Send Files button: on click of this button i'm invoking the JavaScript Function readFiles( ). within this function i'm creating object like -

var objFile = new ActiveXObject("ModuleX.FileControl");

here its failing.