Douglas wrote:
Sorry for the re-post, ISP troubles grr...
anyways...
Gday All,
I am developing a DLL (using VB6) for use in an IIS5 ASP Application.
This DLL contains a series of 'Public Enum'(s)
During testing in VB6 these enums work fine, however when used in an
ASP context I get the following Error Message:
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'HeaderStyle'
However, if I substitute the Enum for its value (ie: HeaderStyle = 3)
I get the expected functionality.
eg:
Address.Suburb(HeaderStyle)
returns the above error message.
Why would you think this should work? The HeaderStyle constant has not been
defined in your vbscript code.
Address.Suburb(3)
works fine.
As it should.
Can someone please enlighten me as to HOW ASP handles ENUMs.
First of all, vbscript does not support enum's. Secondly, constants that are
declared in a dll are not automatically visible to the process that is
calling the dll.
To see one way of handling this issue take a look at:
C:\Program Files\Common Files\System\ADO\adovbs.inc
Another way is to create a type library (this is off topic for this list -
use Google to get information about doing this) and use a metadata tag to
reference it. This article provides an example of referencing a type
library:
http://www.aspfaq.com/show.asp?id=2112
HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"