Windows ActiveX Extension Creation for GameMaker Studio pt. 1: ActiveX DLL

Samuel Venable

Time Killer
Next Tutorial: NS Installer
GM Version: GMS 1.x / GMS 2.x
Target Platform: Windows
Required Extension: [link]
Difficulty: Advanced


USE HIGHEST QUALITY (720p) SETTING

[Files used in this video]

Software you will need for this tutorial:
  • GameMaker Studio 1.x Standard/Pro/Master Collection or GameMaker Studio 2.x Desktop Edition
  • Microsoft Visual Basic/Studio 5.x Pro/Enterprise or Microsoft Visual Basic/Studio 6.x Pro/Enterprise
  • My *free* Microsoft Script Control Extension from the GameMaker Marketplace

Languages you will need to be somewhat familiar with how to write:
  • GameMaker Language
  • Visual Basic 5 or Visual Basic 6
  • Visual Basic Script
  • Java Script

What programming languages can I use to create an ActiveX DLL?
  • Visual Basic 5
  • Visual Basic 6
  • Visual Basic .NET
  • Pascal
  • Delphi
  • C++ (MFC)
  • C# .NET
  • and more

Code snippets used in video:

VB5/VB6 code:
Code:
Option Explicit

Function AddNumbers(Number1 As Double, Number2 As Double) As Double
    AddNumbers = Number1 + Number2
End Function

Function AddStrings(String1 As String, String2 As String) As String
    AddStrings = String1 + String2
End Function
GML/VBS code:
Code:
show_message(EvaluateExpression('Result', '

    Set objTest = CreateObject("TutorialExample.TutorialExampleCtrl")
    Result = objTest.AddNumbers(2, 2)

', "VBScript"));
GML/JS code:
Code:
show_message(EvaluateExpression('Result', '

    var objTest = new ActiveXObject("TutorialExample.TutorialExampleCtrl");
    Result = objTest.AddStrings("Hello ", "World!");

', "JScript"));
 
Last edited:

Samuel Venable

Time Killer
Languages my tutorial does not cover:
  • Visual Basic .NET
  • Pascal
  • Delphi
  • C++ (MFC)
  • C# .NET
  • and more

Is there a particular one of these languages that anyone would like me to do a new tutorial on for ActiveX-based GameMaker extension writing?

I'm taking requests if you guys need it.
 
Last edited:
Top