You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: single_instance.go
    path of file: ./repos/wails/v2/internal/frontend/desktop/windows
    
    the code of the file until where you have to start completion: //go:build windows

package windows

import (
	"encoding/json"
	"github.com/wailsapp/wails/v2/internal/frontend/desktop/windows/winc/w32"
	"github.com/wailsapp/wails/v2/pkg/options"
	"golang.org/x/sys/windows"
	"log"
	"os"
	"syscall"
	"unsafe"
)

type COPYDATASTRUCT struct {
	dwData uintptr
	cbData uint32
	lpData uintptr
}

// WMCOPYDATA_SINGLE_INSTANCE_DATA we define our own type for WM_COPYDATA message
const WMCOPYDATA_SINGLE_INSTANCE_DATA = 1542

func SendMessage(hwnd w32.HWND, data string) {
	arrUtf16
    
func SetupSingleInstance(uniqueId string) {
	id := "wails-app-" + uniqueId

	className := id + "-sic"
	windowName := id + "-siw"
	mutexName := id + "sim"

	_, err := windows.CreateMutex(nil, false, windows.StringToUTF16Ptr(mutexName))

	if err != nil {
		if err == windows.ERROR_ALREADY_EXISTS {
			// app is already running
			hwnd := w32.FindWindowW(windows.StringToUTF16Ptr(className), windows.StringToUTF16Ptr(windowName))

			if hwnd != 0 {
				data := options.SecondInstanceData{
					Args: os.Args[1:],
				}
				data.WorkingDirectory, err = os.Getwd()
				if err != nil {
					log.Printf("Failed to get working directory: %v", err)
					return
				}
				serialized, err := json.Marshal(data)
				if err != nil {
					log.Printf("Failed to marshal data: %v", err)
					return
				}

				SendMessage(hwnd, string(serialized))
				// exit second instance of app after sending message
				os.Exit(0)
			}
			// if we got any other unknown error we will just start new application instance
		}
	} else {
		createEventTargetWindow(className, windowName)
	}
}