Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 17th, 2004, 06:06 AM
Registered User
 
Join Date: May 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to seeekvb Send a message via MSN to seeekvb Send a message via Yahoo to seeekvb
Default acessing DLL functions in VB Scripting

I have developed a Dll Using VC to access the Parallel Port of the Computer. It has only Two Function Inport(PortAddress) and OutPort( PortAddress, Data). these Funciton run on the VB Application very fine.

I want to develop the Web Site for this . FOr this Purpose I used the VB Scripting and made ASP Pages. There is a problem when I try to access the Functions of Dll. It gives me message Type Miss Match.


Please Help Me and tell me how my problem can be solved. Waiting your answers anxiously.

Reply With Quote
  #2 (permalink)  
Old May 17th, 2004, 10:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

What are the data types for these fields? ASP only recognizes variant, so in your DLL, the function parameters must be variant.

Brian
Reply With Quote
  #3 (permalink)  
Old June 1st, 2004, 05:06 AM
Registered User
 
Join Date: May 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to seeekvb Send a message via MSN to seeekvb Send a message via Yahoo to seeekvb
Default

Quote:
quote:Originally posted by seeekvb
 I have developed a Dll Using VC to access the Parallel Port of the Computer. It has only Two Function Inport(PortAddress) and OutPort( PortAddress, Data). these Funciton run on the VB Application very fine.

I want to develop the Web Site for this . FOr this Purpose I used the VB Scripting and made ASP Pages. There is a problem when I try to access the Functions of Dll. It gives me message Type Miss Match.


Please Help Me and tell me how my problem can be solved. Waiting your answers anxiously.


[u]Dll function is given below with data types</u>

int CALLBACK OutPort(int PortAddress, int data)
{
int ret;
ret= _outp(unsigned short(PortAddress),data);
return ret;
}

int CALLBACK InPort(int PortAddress= 888)
{
int data;
data = _inp(unsigned short(PortAddress));

return data;

}



Reply With Quote
  #4 (permalink)  
Old June 1st, 2004, 07:58 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

Again ASP only supports variant... you must use functions like cint() or cstr() to convert the data into the appropriate type to work successfully.

Brian
Reply With Quote
  #5 (permalink)  
Old June 21st, 2004, 05:11 AM
Registered User
 
Join Date: May 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to seeekvb Send a message via MSN to seeekvb Send a message via Yahoo to seeekvb
Default

Thanks for guiding me. i used the CInt and it solved my problem.

I want to have some more guidance from u. As VB provides Timer to generate an action set by the timer function. can we use timer like function in our ASP Page by getting time in minutes and on reaching that point a specific instruction is exequted. We are getting time in text box. and we also want to check in local that is it empty or not. how we can do it using vbscript.

Advance thanks for guiding me.

Quote:
quote:Originally posted by bmains
 Hello,

Again ASP only supports variant... you must use functions like cint() or cstr() to convert the data into the appropriate type to work successfully.

Brian
Reply With Quote
  #6 (permalink)  
Old January 15th, 2007, 06:58 PM
Registered User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm having the same problem.
Have you can solved it?
Could you send me a source code?

Best regards

Saludos
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
VB Scripting namitas Visual Basic 2008 Professionals 0 June 12th, 2008 08:58 AM
How to access functions of Dll created in VC in VB seeekvb BOOK: Beginning ASP.NET 1.0 4 January 15th, 2007 06:58 PM
imported DLL functions in MFC atmosphere Visual C++ 0 June 4th, 2006 08:30 PM
call functions of dll Digon Classic ASP Basics 1 December 13th, 2005 06:12 AM
Permission denied in acessing dll files sobhamuktha VB Components 6 February 4th, 2005 08:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.