Click here to Skip to main content
15,924,679 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalplacing over 255 menu items Pin
Avishai Eldar10-Apr-00 10:45
Avishai Eldar10-Apr-00 10:45 
GeneralRe: placing over 255 menu items Pin
Konstantin Vasserman13-May-00 13:37
Konstantin Vasserman13-May-00 13:37 
GeneralRe: placing over 255 menu items Pin
Dave Kreskowiak11-Aug-03 1:36
mveDave Kreskowiak11-Aug-03 1:36 
GeneralRe: placing over 255 menu items Pin
Eytukan8-Jan-07 16:40
Eytukan8-Jan-07 16:40 
GeneralRe: placing over 255 menu items Pin
Johan Pretorius8-Jan-07 19:46
Johan Pretorius8-Jan-07 19:46 
GeneralRe: placing over 255 menu items Pin
Eytukan8-Jan-07 19:49
Eytukan8-Jan-07 19:49 
GeneralDynamic Loading of DLL in VB Pin
Bert Buckey21-Mar-00 14:13
sussBert Buckey21-Mar-00 14:13 
GeneralRe: Dynamic Loading of DLL in VB Pin
Russ10-Apr-00 0:44
Russ10-Apr-00 0:44 
I don't think that VB can use function pointers to call functions (although I'm not 100% positive). You can Declare a function and use it in VB (see docs on the Declare keyword). However your app will fail to load if wtsapi32.dll isn't on the system.

A solution for this would be to encapsulate all your WTS calls in a COM object in a separate DLL. Then, if your app wants to make some WTS calls, it can create an instance of this COM object and do what needs to be done. When your app isn't on a terminal server, it won't ever create this COM object.

Another solution would be to create a "stub" DLL, in C, that wrapped each function in wtsapi32 you wanted to call. Use the Declare keyword in your VB app to import each of these functions from your stub DLL. Then, when you wanted to call a certain wtsapi32 function, you'd instead call one of your stub dll's functions to do the dirty work (GetProcAddress(), call function, package return values and other info, then pass back to the calling VB function).

If your project is mainly VB, I'd take solution #1. If your project is enough of a mix of C and VB that you don't mind maintaining the C stub as part of the project, go for #2.
QuestionVBScript - Click Handler For Form Button? Pin
Member 239621-Feb-00 0:47
Member 239621-Feb-00 0:47 
AnswerRe: VBScript - Click Handler For Form Button? Pin
jburrow17-Apr-00 6:31
jburrow17-Apr-00 6:31 
GeneralUsing WebBrowser Control in VB6 Pin
Bagyalakshmi SN29-Dec-99 20:21
sussBagyalakshmi SN29-Dec-99 20:21 
GeneralRe: Using WebBrowser Control in VB6 Pin
Russ10-Apr-00 0:53
Russ10-Apr-00 0:53 
GeneralAD: Visual Basic Database tutorial Pin
Member 342022-Dec-99 23:25
Member 342022-Dec-99 23:25 
GeneralRe: AD: Visual Basic Database tutorial Pin
softminds4n116-Mar-04 4:46
softminds4n116-Mar-04 4:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.