Issue in calling a function from DLL in GO Lang

Problem Description : There is dll( A1.dll- compiled in C++) in which a function is defined as EXPORT void S3(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow){} I want to load this DLL using GO lang. For this I am writing below program:

package main

import (


func main() {
    dll, err := syscall.LoadDLL("A1.dll")
    proc, err := dll.FindProc("S3")
    _, _, dllError := proc.Call()
    fmt.Println("calling S3")
    fmt.Printf("Error, err: %s\n", dllError)
    fmt.Printf("Error, err: %s\n", err)

This is not working. Also I am not able to understand that here how to pass the parameter in call function according to function S3 definition. Could anybody help me in understanding this issue?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.