ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 26th, 2003, 04:19 PM
benseri benseri is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Israel
Posts: 102 benseri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to benseri
Windows Functions

Does AnyBody know how to run windows functions in ASP?

I want to run the function GetSystemMetrics From ASP and i don't know how i can do it.

in VB i know to how to declare windows functions and how to use them, but in asp the script didn't work.

can you help?

Reply With Quote
  #2  
Old June 27th, 2003, 05:44 AM
benseri benseri is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Israel
Posts: 102 benseri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to benseri
Question but how?

how do i include dlls in asp? is it with the creat object?

and can i use dll i made in VisualBasic? how do i register the dll?

Reply With Quote
  #3  
Old June 27th, 2003, 07:43 AM
lordkyl lordkyl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 27 lordkyl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
echolalia is right. Here are the basic steps you will need to follow.

In VB (or some other language) you will have to write a com object. When writing it you would give the class a name. For example, WindowsAPI.GetSystemMetrics or something like that. In fact, you may be able to just make a class that extends the existing windows api dll.

Then you would build a dll and register it on the server that the ASP is being hosted at.

Using ASP you could then create an instance of the object with server.createobject.

That is roughly how you would go about it. If you've never written a DLL before it may be quite a daunting task. If you are familiar with VB you can probably do it, though...with a little research.

Reply With Quote
  #4  
Old June 27th, 2003, 10:06 AM
benseri benseri is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Israel
Posts: 102 benseri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to benseri
Thanks for the help, but i didn't quite did it.

here is what i have done, correct me in order to make it work:

First I Opend VB 6.0 then open a ActiveX Dll Project.
I then Called the class - "GSM" and added a module to the project wich in I declared the windows API function:

Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long

In the Class Module i added this script:

Function GSM(n) As Long
GSM = GetSystemMetrics(n)
End Function

and then I Made the dll that i called "gsm.dll".
i located the dll in the root directory of the PWS that is installed on my computer and wrote this ASP:
<%
set obj = server.CreateObject( "gsm" )
dim cx
cx = obj.GSM(0)
response.write(cx)
set obj = Nothing
%>

the error i recived was:
"
Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/obj2.asp, line 4

800401f3 "



what should i do?

Reply With Quote
  #5  
Old June 27th, 2003, 10:14 AM
lordkyl lordkyl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 27 lordkyl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Did you regster the dll?

If not, run this command (in the directory that the dll is in)

regsvr32 filename.dll

Reply With Quote
  #6  
Old June 27th, 2003, 05:48 PM
benseri benseri is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Israel
Posts: 102 benseri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to benseri
Smile Thanks!

Thanks Alot for the Help Guys! , I finally managed to make it work (thanks to you).

Bentz!

Reply With Quote
  #7  
Old June 27th, 2003, 05:51 PM
benseri benseri is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Israel
Posts: 102 benseri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to benseri
Say, How Can U register the dll on an internet Server Where I upload my ASP's?

I registered the dll on my computer but how can I do it on another server?

Reply With Quote
  #8  
Old June 28th, 2003, 04:19 PM
benseri benseri is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Israel
Posts: 102 benseri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to benseri
So actually there is no way I can run windows API funtions on the internet?!

enlse I have a home server.....

what a waste of time......

Reply With Quote
  #9  
Old June 30th, 2003, 07:41 AM
lordkyl lordkyl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 27 lordkyl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Depending on the hosting company, you might be able to get them to install a 3rd party product that does the same thing.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Windows Functions


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway