csx 4 年之前
父節點
當前提交
477aa8e132
共有 1 個文件被更改,包括 10 次插入4 次删除
  1. 10 4
      controllers/sg/his_api_controller.go

+ 10 - 4
controllers/sg/his_api_controller.go 查看文件

@@ -98,11 +98,17 @@ func (c *HisApiController) TestGetBasBaseInfo() {
98 98
 	result := int(ret)
99 99
 	fmt.Println("SSCard的运算结果为1:", result)
100 100
 
101
-	path := ""
102
-	bytePath := []byte(path + "\x00")
103
-	bytePath2 := []byte(path + "\x00")
101
+	//path := ""
102
+	//bytePath := []byte(  "\x00")
103
+	//bytePath2 := []byte(  "\x00")
104 104
 
105
-	ret2, _, err2 := readCard.Call((uintptr)(unsafe.Pointer(&bytePath[0])), IntPtr(1024), (uintptr)(unsafe.Pointer(&bytePath2[0])), IntPtr(1024))
105
+	str := make([]byte, 256)
106
+	str1 := make([]byte, 256)
107
+
108
+	s2 := []byte(string(str) + "\x00")
109
+	s3 := []byte(string(str1) + "\x00")
110
+
111
+	ret2, _, err2 := readCard.Call((uintptr)(unsafe.Pointer(&s2[0])), IntPtr(1024), (uintptr)(unsafe.Pointer(&s3[0])), IntPtr(1024))
106 112
 	fmt.Println(" Add(4,5)的结果为:", ret2)
107 113
 	fmt.Println(" str:", bytePath)
108 114
 	fmt.Println(" str1:", bytePath2)