feat: 解决了一些问题

This commit is contained in:
cc committed 2026-01-28 23:04:29 +08:00
1 parent a215886015
commit 77689ec528
19 files changed
+2032 -454

No files matched your search

+6 -5
View File
@@ -246,14 +246,15 @@ export class WcdbCore {
// InitProtection (Added for security)
try {
this.wcdbInitProtection = this.lib.func('bool InitProtection(const char* resourcePath)')
const protectionOk = this.wcdbInitProtection(dllDir)
if (!protectionOk) {
console.error('Core security check failed')
this.wcdbInitProtection = this.lib.func('int32 InitProtection(const char* resourcePath)')
const protectionCode = this.wcdbInitProtection(dllDir)
if (protectionCode !== 0) {
console.error('Core security check failed:', protectionCode)
lastDllInitError = `初始化失败,错误码: ${protectionCode}`
return false
}
} catch (e) {
console.warn('InitProtection symbol not found:', e)
console.warn('InitProtection symbol not found or failed:', e)
}
// 定义类型