Browse Source

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 3 years ago
parent
commit
a6550ef32a
1 changed files with 5 additions and 6 deletions
  1. 5 6
      controllers/js/jsyb_controller.go

+ 5 - 6
controllers/js/jsyb_controller.go View File

@@ -521,18 +521,17 @@ func (c *JSybController) TestGetBasBaseInit(code string, secret_key string, ak s
521 521
 func (c *JSybController) GetBasBaseInfo() string {
522 522
 	DllDef := syscall.MustLoadDLL("HeaSecReadInfo.dll")
523 523
 	readCard := DllDef.MustFindProc("ReadCardBas")
524
-	if readCard == nil {
525
-		fmt.Println("readcard is nil")
526
-		readCard = DllDef.MustFindProc("ReadCardBas")
527
-	}
524
+	fmt.Println(readCard)
525
+	readCard = DllDef.MustFindProc("ReadCardBas")
528 526
 	fmt.Println("!!!!!")
529 527
 	str := make([]byte, 2048)
530 528
 	str1 := make([]byte, 8192)
531 529
 	ret2, _, _ := readCard.Call((uintptr)(unsafe.Pointer(&str[0])), (uintptr)(unsafe.Pointer(&str1[0])))
530
+	fmt.Println(ret2)
532 531
 	fmt.Println(string(str1))
533 532
 	fmt.Println(string(str))
534
-	//fmt.Println(":", ConvertToString(string(str1), "gbk", "utf-8"))
535
-	//fmt.Println(":", ConvertToString(string(str), "gbk", "utf-8"))
533
+	fmt.Println(":", ConvertToString(string(str1), "gbk", "utf-8"))
534
+	fmt.Println(":", ConvertToString(string(str), "gbk", "utf-8"))
536 535
 	if ret2 != 0 {
537 536
 		return ""
538 537
 	}