Private Declare Function 
Author Message
 Private Declare Function

Is this posible in HTML VBScript Language?

What i'm trying to do is auto populate or retrieve the user's login id.

i am trying to declare this in:

<SCRIPT LANGUAGE="VBScript">
<!--
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
 & "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

but sum how it keeps start debug in line 17:  Function

Any help... i mean ANY... would be greatly appreciated.

Ronin



Tue, 27 Sep 2005 09:57:54 GMT  
 Private Declare Function
Sorry, but no.  The closest you are going to get is to write a COM wrapper
around whatever Win32 API functions you would like to have available, and
then create an instance of that object wherever you want it to run.

Unfortunately, all of the difficulties in getting a custom component loaded
and registered at every location where its needed apply.

With that said, if you're going after the username, you might be able to get
the same information from ADSI, assuming your script was trusted (again, the
difficulties in creating trusted scripts on the client-side still apply).

--
Very respectfully,
Todd Lewis

-- remove the capital letters to contact me --


Quote:
> Is this posible in HTML VBScript Language?

> What i'm trying to do is auto populate or retrieve the user's login id.

> i am trying to declare this in:

> <SCRIPT LANGUAGE="VBScript">
> <!--
> Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
>  & "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

> but sum how it keeps start debug in line 17:  Function

> Any help... i mean ANY... would be greatly appreciated.

> Ronin



Tue, 27 Sep 2005 10:23:25 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to use API Function Private Declare Function " GetCharWidth "

2. Declaring variables as Static vs Private/Public -- XML

3. PRIVATE DECLARE ... Handling returns (DLL)

4. private vs public API declares

5. Private functions

6. Private in a Function

7. Use of Private in a VBS function

8. working with functions, subroutines, private and public variables

9. Private & Public Subs/Functions Question

10. private and not private

11. Private vs. Intrinsic Function

12. Private Functions with ADT2.0

 

 
Powered by phpBB® Forum Software