🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #15445

Re: [VB 6] Enkele vraagjes

#15445
From: Development
Date: Wed, 04 Oct 2000 05:23
99 lines
3228 bytes

Van Leuven wrote:

> Hallo,
> ik ben bezig een cd-rom te maken in Visual Basic 6.0, en ik hab enkele
> vraagjes:
>     - Hoe kun je detecteren of er op een computer DirectX 7 ge�nstalleerd
> is?

Volgende API (zelf 'ns ergens van het Web geplukt) voor het detecteren van
executables.

Good luck,
Waldo Smets
SoftwareSuite
Heverlee-LEUVEN

Private Declare Function FindExecutableA Lib "shell32.dll" _
   (ByVal lpFile As String, ByVal lpdirectory As _
   String, ByVal lpResult As String) As Long

Private Const MAX_FILENAME_LEN = 256
'------------------------------------------------

Public Function FindExecutable(s As String) As String
'------------------------------------------------

'DESCRIPTION:
'-----------
' This command will locate the executable associated
' with the filename passed down as a string.
'------------------------------------------------
'INPUT:
'------
' s    - The filename whose extension type the API
'        call looks up and returns and executable path to.
'------------------------------------------------
' OUTPUT:
'--------
' Executable path associated with the s filename's
' extension.
'------------------------------------------------
' SAMPLE CALL:
'-------------
' vRC = Shell(FindExecutable(sDataFileName))
' or
' sExecFile = FindExecutable(sDataFileName)
'------------------------------------------------

'DECLARATIONS
'------------
   Dim i As Integer
   Dim s2 As String

'INITIALIZE
'----------
    On Error GoTo ErrHandler

'MAIN BODY
'---------
   s2 = String(MAX_FILENAME_LEN, 32) & Chr$(0)

   i = FindExecutableA(s & Chr$(0), vbNullString, s2)

   If i <= 32 Then GoTo WrapUpErr

'WRAP-UP
'-------
WrapUp:
    FindExecutable = Left$(s2, InStr(s2, Chr$(0)) - 1)
Exit Function

WrapUpErr:
    FindExecutable = ""
Exit Function


'ERROR HANDLER
'-------------
ErrHandler:
    'ErrHandler Code goes here
Resume WrapUpErr

End Function





>
>     - Hoe kun je de standaardbrowser starten met een door mij opgegeven url?
>     - Kan er mij iemand een adres geven waar meer uitleg staat hoe je geluid
> kunt afspelen met DirectX 7?
>
> Alvast bedankt voor de moeite!
>
> MVG,
> Pieter
Technical Details
Message-ID: <39DABED0.F356C834@softwaresuite.be>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.icl.net!colt.net!zapata.tvd.be!news.tvd.be!news.chello.be!not-for-mail
References: <8o3243$dhp$1@news0.skynet.be>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: fcea4,338055041913c1df
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2000-10-03 23:28:14 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.icl.net!colt.net!zapata.tvd.be!news.tvd.be!news.chello.be!not-for-mail
Message-ID: <39DABED0.F356C834@softwaresuite.be>
From: "Development@SoftwareSuite.be" <development@softwaresuite.be>
X-Mailer: Mozilla 4.75 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: be.comp.programming
Subject: Re: [VB 6] Enkele vraagjes
References: <8o3243$dhp$1@news0.skynet.be>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Lines: 100
Date: Wed, 04 Oct 2000 05:23:47 GMT
NNTP-Posting-Host: 195.162.216.140
X-Complaints-To: abuse@chello.be
X-Trace: news.chello.be 970637027 195.162.216.140 (Wed, 04 Oct 2000 07:23:47 MET DST)
NNTP-Posting-Date: Wed, 04 Oct 2000 07:23:47 MET DST
Organization: Chello Usenet Service