PDA

Click to See Complete Forum and Search --> : Active X Dll


zchoyt
Dec 16th, 2001, 01:15 PM
Hi guys,
I wrote an active X dll for use in an ASP server page. It searches a dir for a certian kind of file and any subdirs. In the dll's source code, the method is declared like this:

public sub SearchDir (byval RootDir as String, byval FilePattern as string, bvref FileArray() as string, byref FolderArray() as string)

When it is called from the client side, you pass it two arrays(filearray and folderarray). The sub will then populate the arrays with the files and folders that it found.

When I tested this method using Vb as the client, it worked great. Then I tried VBScript and ASP code for the client. It generated a "type mismatch error" because of the arrays.

I tried changing the declaration to use variant data type, but I still got the same error.

Is that an illegal move in VBS or ASP? Is that not allowed?

I ended up using two "!" delimited strings instead of the arrays, and parsed it in ASP to get the files and subdirs.

Has anyone run into this problem?

Ed Lampman
Dec 16th, 2001, 04:26 PM
Variants are the only data type allowed in VBS. Maybe arrays are not allowed either. Sorry, but I don't use it and don't know much about it.