473,473 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Using .dll file in html and javascript

1 New Member
Hi, I wrote the following class in C++ just to test:
Expand|Select|Wrap|Line Numbers
  1. #pragma once
  2. #include <windows.h>
  3. #include <stdio.h>
  4. namespace Test1 {
  5.  
  6. public ref class Class1
  7. { public: void Web_Code()  
  8.    { DeleteFile("c:\\Test_Web.txt"); 
  9.      printf("Hello"); 
  10.     }
  11. };
  12. }
  13.  
And built it. So I got Web_Test.dll
I uploaded to my web folder Web_Test.dll
And inserted html onto the web page:
Expand|Select|Wrap|Line Numbers
  1. <OBJECT id="control"
  2.         classid="http:Web_Test.dll#Test1.Class1">
  3.         </OBJECT>
  4.  <script language="javascript">
  5.       function doScript()
  6.        {
  7.         control.Web_Code();
  8.        }
  9.        </script>
  10.    <body onLoad="javascript:doScript();">
  11.  
What it suppose to do is to delete a file on a hard drive and print "Hello" on a screen as a web page is
being opened.

But it does not work!
Can you tell me what is wrong here.
Thanks in advance, G.G.
Nov 11 '09 #1
1 2537
gits
5,390 Recognized Expert Moderator Expert
i doubt that this will work ... the only possibility that i'm aware of for such things would be to build an ActiveX component that could be included with an object-tag and then executed in IE only ... it would be a massive security issue in case a browser would allow what you have intended ... imagine a webpage that could delete files on your filesystem ...

kind regards
Nov 11 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: strutsng | last post by:
<input type="file"> only allows the user to browse for files. How about "browse for folder" dialog? Can html/javascript do that? I couldn't find any syntax for that. If not, please advise what...
13
by: Andy Baxter | last post by:
Can anyone recommend a good online guide to using objects in javascript? The book I bought (DHTML Utopia) suggests using objects to keep the code clean and stop namespace clashes between different...
9
by: outstretchedarm | last post by:
How exactly does HTML/Javascript handle playing midi files? Does it have a player imbedded in it? Or does it borrow from the computer's midi player? How could you make a webpage play certain...
5
by: fjanon | last post by:
Is there a way to remove the default footer/header from the printed page when printing a page from HTML/Javascript in IE 6? I want to use letterhead paper and I have to remove manually the...
12
by: John | last post by:
I have to write a spyder for a webpage that uses html + javascript. I had it written using mechanize but the authors of the webpage now use a lot of javascript. Mechanize can no longer do the job....
1
by: BaaZauq | last post by:
Hello everybody! I'm not a master of clientside JavaScript but I have much working knowledge of it. Here is my problem : I have a web-page with a "text-area" box. I have an excel file with 10...
7
by: snitu | last post by:
hello i am new user of this forum. i have a problem in javascript code. plz. give me idea about how to create tree using xml file (not using xsl file) in javascript. i am also sending my...
7
by: Fuji | last post by:
Dear Sir, Why this code can't be ran in my Internet Explorer? Am I doing wrong in using ActiveXObjectScripting.FileSystemObject")? <html> <head><title>Reading/Writing Text File in...
9
by: ajos | last post by:
hi all, im getting some problems in my javascript validations..... my jsp code--> 8: <head> 9: <title>Budget Master Administration</title> 10: <meta name="GENERATOR" content="Microsoft...
1
by: kalyanmurthy | last post by:
Hi im using ajax and javascript for autosuggest box in my application there im getting one error when i select any one in autosuggest box and click on other button its showing Invalid postback or...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.