The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Decompile CHM file; Get short/long path
#1
Function DecompileChmFile
Code:
Copy      Help
;/
function $chmFile $destFolder

;EXAMPLE
;DecompileChmFile "$qm$\qm2help.chm" "$desktop$\qm2help"



mkdir destFolder

str f.GetShortPath(destFolder)
str c.GetShortPath(chmFile)
str cl.format("-decompile %s %s" f c)
run "hh.exe" cl "" "" 0x400

Member function str.GetShortPath
Code:
Copy      Help
function [$path]

;Retrieves short path, eg c:\program files -> c:\progra~1


dll kernel32 #GetShortPathName $lpszLongPath $lpszShortPath cchBuffer

if(len(path)) _s.expandpath(path); else _s.expandpath(this)
this.fix(GetShortPathName(_s this.all(MAX_PATH) MAX_PATH))

Member function str.GetLongPath
Code:
Copy      Help
function [$path]

;Retrieves long path, eg c:\progra~1 -> c:\program files


dll kernel32 #GetLongPathName $lpszShortPath $lpszLongPath cchBuffer

if(len(path)) _s.expandpath(path); else _s.expandpath(this)
this.fix(GetLongPathName(_s this.all(MAX_PATH) MAX_PATH))


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)