Ole unrecoverable error

Ole unrecoverable error

Postby cdmmaui » Thu Aug 24, 2017 8:21 am

Hello Everyone,

I am getting an unrecoverable error when running a FWH application on Windows Server 2008, however if I run under Windows 7 Pro it works fine.

Here is the code and error
/-------------------------------------------------------------------------------
FUNCTION _XmlQuery()

local cURL := "https://xxx.com/token" , ;
cSaveAs := "c:\winapps\onasset\xml\inbox\" , ;
lPass := .F. , ;
oProg := 0 , ;
cHttpSend2 := "" , ;
oHttp2 , ;
cHttpSend3 := "" , ;
oHttp3 , ;
cWinResp := "" , ;
cTokenId := "" , ;
cDateFrom := "" , ;
cDateTo := "" , ;
aTokenResponse := {} , ;
nUpdate := 0

// Init...
cSaveAs += DTOS(DATE())+LEFT(TIME(),2)+SUBSTR(TIME(),4,2)+RIGHT(TIME(),2) + ".XML"

// Authorization...
TRY
oHttp2 := CreateObject( 'MSXML2.XMLHTTP' )
CATCH
oHttp2 := CreateObject( 'Microsoft.XMLHTTP' )
END
TRY
oHttp2:Open( 'POST', cURL, .F. )
oHttp2:SetRequestHeader( "Content-Type","application/json")
cHttpSend2 := 'grant_type=client_credentials&client_id=x&client_secret=x'
oHttp2:Send( cHttpSend2 )
Sysrefresh()
cWinResp := oHttp2:ResponseBody

// Token ID...
nPos := AT( "ACCESS_TOKEN", UPPER(cWinResp) )
lStart := .F.

FOR nX0=nPos TO LEN(cWinResp)
cChar := SUBSTR( cWinResp, nX0, 1 )
IF cChar==":"
lStart := .T.
ELSE
IF cChar==","
EXIT
ELSE
IF lStart .AND. (! EMPTY( cChar ))
IF cChar<>CHR(34)
cTokenId += cChar
ENDIF
ENDIF
ENDIF
ENDIF
NEXT nX0

// Init...
cDate0 := DTOS( DATE()-1 )
cDate1 := DTOS( DATE() )
nTime1 := VAL(LEFT(TIME(),2))-23
IF (nTime1<1)
nTime1 := 0
ENDIF
cTime1 := RIGHT( "00" + LTRIM(STR(nTime1,9)), 2 ) + SUBSTR(TIME(),3)
cTime2 := TIME()
cDateFrom := LEFT(cDate0,4)+"-"+SUBSTR(cDate0,5,2)+"-"+RIGHT(cDate0,2) + "T" + cTime1 + "Z"
cDateTo := LEFT(cDate1,4)+"-"+SUBSTR(cDate1,5,2)+"-"+RIGHT(cDate1,2) + "T" + cTime2 + "Z"
cURL := "https://xxx.com/yyy/1/zzz/000/devicereports?from=" + cDateFrom + "&to=" + cDateTo + "&page=1&pageSize=500"
//MsgInfo( cURL )
CATCH
DbCloseAll()
QUIT
END
oHttp2 := NIL

// Get Request...
TRY
oHttp3 := CreateObject( 'MSXML2.XMLHTTP' )
CATCH
oHttp3 := CreateObject( 'Microsoft.XMLHTTP' )
END
oHttp3:Open( 'GET', cURL, .F. )
oHttp3:SetRequestHeader( "Content-Type","application/json")
oHttp3:SetRequestHeader( "Authorization","Bearer " + cTokenId )
oHttp3:Send( NIL )
Sysrefresh()
cWinResp := oHttp3:ResponseBody
oHttp3 := NIL

// Build Array...
aTokenResponse := _TokenResponse( cWinResp, @nUpdate )

RETURN (nUpdate)

/-------------------------------------------------------------------------------
Application Internal Error - C:\winapps\cdm\onasset.exe
Terminated at: 2017.08.24 03:15:02
Unrecoverable error 6005: Exception error:

Exception Code:C0000005
Exception Address:71131CC5
EAX:00000000 EBX:6F3928C5 ECX:6C16F286 EDX:02030048
ESI:00000000 EDI:00000000 EBP:034EF8DC
CS:EIP:0023:71131CC5 SS:ESP:002B:034EF634
DS:002B ES:002B FS:0053 GS:002B
Flags:00010293
CS:EIP: 8B F8 3B FE 0F 84 94 12 00 00 39 B5 B4 FD FF FF
SS:ESP: 040F7D9C 040F7CC8 040F7CC8 6BF20E0C 00000000 00000000 71131DA4 00000001 00000001 00000000 034EF67C 00000008 00000000 00000000 00000000 00000000

C stack:
EIP: EBP: Frame: OldEBP, RetAddr, Params...
71131CC5 034EF8DC 034EFB58 70E566BE 034EF954 034EF950 040D1BFC 00000000 00000000 00000000 00000000 00000000
70E566BE 034EFB58 034EFBE4 70E56156 040F7CC8 00000000 00000000 0000002E 00000000 00000027 76AEE000 00000000
70E56156 034EFBE4 034EFC1C 70E56A89 00000000 0000002E 034EFC24 00000000 00000000 040C7ED8 DA128700 034EFC5C
70E56A89 034EFC1C 034EFC5C 769BFEA0 040DAFB8 0000002E 00000000 040C7ED8 034EFC54 040C0C90 00000000 7693E9CC
769BFEA0 034EFC5C 034EFC8C 769C2733 040C0C90 034EFCB8 7693E9CC 00000000 00000000 034EFCB8 00000000 00000000
769C2733 034EFC8C 034EFCA0 769C29D6 040C0C90 034EFCB8 00000000
769C29D6 034EFCA0 034EFCD0 769C383D 00000000 040C0C90 00000000 00000000 034EFCB8 034EFCB8 00000000 00000000
769C383D 034EFCD0 034EFCFC 769C36F6 00000003 00000000 02378ED8 00000000 00000000 00002134 00000003 040C0C90
769C36F6 034EFCFC 034EFD60 769CD9D2 040C0C30 034EFD38 034EFD24 7693EA3C 0238B310 00000000 02378ED8 00002134
769CD9D2 034EFD60 034EFDAC 769CCE1C 040C1C00 034EFDB8 769CCD80 00000000 00000000 00000000 00000000 00000000
769CCE1C 034EFDAC 034EFDC4 769495C3 0238B310 00000000 04091CC0 00000000
769495C3 034EFDC4 034EFE38 777D7EDF 040C1C00 E5D0F496 04091CC0 00000002 0001000E 00000024 00000001 00000000
777D7EDF 034EFE38 034EFF88 777C0951 040C1C00 04091CC0 E5D0F526 00000000 00000000 02355978 0385FE58 77870180
777C0951 034EFF88 034EFF94 7719336A 02355978
7719336A 034EFF94 034EFFD4 777A9902 02355978 E5D0F57A 00000000 00000000 02355978 00000000 00000000 00000000
777A9902 034EFFD4 034EFFEC 777A98D5 777C046C 02355978 FFFFFFFF 778375CC


Modules:
0x00400000 0x002FA000 C:\web\scv\onasset.exe
0x77770000 0x00180000 C:\Windows\SysWOW64\ntdll.dll
0x77180000 0x00110000 C:\Windows\syswow64\kernel32.dll
0x77320000 0x00047000 C:\Windows\syswow64\KERNELBASE.dll
0x71D60000 0x00018000 C:\Windows\system32\tsappcmp.dll
0x750B0000 0x000AC000 C:\Windows\syswow64\msvcrt.dll
0x76EA0000 0x00100000 C:\Windows\syswow64\USER32.dll
0x764E0000 0x00090000 C:\Windows\syswow64\GDI32.dll
0x765D0000 0x0000A000 C:\Windows\syswow64\LPK.dll
0x76440000 0x0009D000 C:\Windows\syswow64\USP10.dll
0x76DE0000 0x000A1000 C:\Windows\syswow64\ADVAPI32.dll
0x76B30000 0x00019000 C:\Windows\SysWOW64\sechost.dll
0x76CF0000 0x000F0000 C:\Windows\syswow64\RPCRT4.dll
0x75010000 0x00060000 C:\Windows\syswow64\SspiCli.dll
0x75000000 0x0000C000 C:\Windows\syswow64\CRYPTBASE.dll
0x76FA0000 0x0015D000 C:\Windows\syswow64\ole32.dll
0x75310000 0x00060000 C:\Windows\system32\IMM32.DLL
0x75370000 0x000CD000 C:\Windows\syswow64\MSCTF.dll
0x733F0000 0x00009000 C:\Windows\system32\VERSION.DLL
0x71CF0000 0x00051000 C:\Windows\system32\WINSPOOL.DRV
0x71C60000 0x00084000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18837_none_ec86b8d6858ec0bc\COMCTL32.DLL
0x75280000 0x0007B000 C:\Windows\syswow64\COMDLG32.DLL
0x75190000 0x00057000 C:\Windows\syswow64\SHLWAPI.dll
0x75590000 0x00C4C000 C:\Windows\syswow64\SHELL32.dll
0x71D50000 0x00005000 C:\Windows\system32\MSIMG32.DLL
0x767E0000 0x00091000 C:\Windows\syswow64\OLEAUT32.DLL
0x71C40000 0x0001C000 C:\Windows\system32\OLEDLG.DLL
0x70F10000 0x0004C000 C:\Windows\system32\apphelp.dll
0x6C150000 0x0008D000 C:\Windows\AppPatch\AcLayers.dll
0x76780000 0x00017000 C:\Windows\syswow64\USERENV.dll
0x75300000 0x0000B000 C:\Windows\syswow64\profapi.dll
0x70E80000 0x00012000 C:\Windows\system32\MPR.dll
0x6F370000 0x00219000 C:\Windows\AppPatch\AcGenral.DLL
0x70D80000 0x00080000 C:\Windows\system32\UxTheme.dll
0x70CE0000 0x00032000 C:\Windows\system32\WINMM.dll
0x70ED0000 0x0000F000 C:\Windows\system32\samcli.dll
0x70EA0000 0x00014000 C:\Windows\system32\MSACM32.dll
0x70E70000 0x00003000 C:\Windows\system32\sfc.dll
0x70E40000 0x0000D000 C:\Windows\system32\sfc_os.DLL
0x70E20000 0x00013000 C:\Windows\system32\dwmapi.dll
0x76B50000 0x0019D000 C:\Windows\syswow64\SETUPAPI.dll
0x76710000 0x00027000 C:\Windows\syswow64\CFGMGR32.dll
0x75160000 0x00012000 C:\Windows\syswow64\DEVOBJ.dll
0x75440000 0x0014B000 C:\Windows\syswow64\urlmon.dll
0x77100000 0x00004000 C:\Windows\syswow64\api-ms-win-downlevel-ole32-l1-1-0.dll
0x76570000 0x00004000 C:\Windows\syswow64\api-ms-win-downlevel-shlwapi-l1-1-0.dll
0x75180000 0x00005000 C:\Windows\syswow64\api-ms-win-downlevel-advapi32-l1-1-0.dll
0x77740000 0x00004000 C:\Windows\syswow64\api-ms-win-downlevel-user32-l1-1-0.dll
0x76430000 0x00004000 C:\Windows\syswow64\api-ms-win-downlevel-version-l1-1-0.dll
0x76E90000 0x00003000 C:\Windows\syswow64\api-ms-win-downlevel-normaliz-l1-1-0.dll
0x76420000 0x00003000 C:\Windows\syswow64\normaliz.DLL
0x761E0000 0x00235000 C:\Windows\syswow64\iertutil.dll
0x76880000 0x002AB000 C:\Windows\syswow64\WININET.dll
0x6BEF0000 0x00259000 C:\Windows\AppPatch\AcXtrnal.DLL
0x70500000 0x00006000 C:\Windows\system32\SHUNIMPL.DLL
0x751F0000 0x00083000 C:\Windows\syswow64\CLBCatQ.DLL
0x6B300000 0x00134000 C:\Windows\System32\msxml3.dll
0x72910000 0x00017000 C:\Windows\System32\bcrypt.dll
0x6F020000 0x0000D000 C:\Windows\system32\SortServer2003Compat.dll
0x70D20000 0x0005F000 C:\Windows\system32\SXS.DLL
0x6F000000 0x00004000 C:\Windows\system32\api-ms-win-downlevel-shlwapi-l2-1-0.dll
0x71E20000 0x00008000 C:\Windows\system32\Secur32.dll
0x71A80000 0x00004000 C:\Windows\system32\api-ms-win-downlevel-advapi32-l2-1-0.dll
0x76740000 0x00035000 C:\Windows\syswow64\WS2_32.dll
0x750A0000 0x00006000 C:\Windows\syswow64\NSI.dll
0x715A0000 0x0003C000 C:\Windows\system32\mswsock.dll
0x710E0000 0x00006000 C:\Windows\System32\wship6.dll
0x765E0000 0x00121000 C:\Windows\syswow64\CRYPT32.dll
0x767A0000 0x0000C000 C:\Windows\syswow64\MSASN1.dll
0x70E50000 0x0001C000 C:\Windows\system32\IPHLPAPI.DLL
0x71570000 0x00007000 C:\Windows\system32\WINNSI.DLL
0x71090000 0x00044000 C:\Windows\system32\DNSAPI.dll
0x71130000 0x00012000 C:\Windows\system32\dhcpcsvc.DLL
0x713B0000 0x00005000 C:\Windows\System32\wshtcpip.dll
0x6C1E0000 0x0005A000 C:\Windows\System32\netprofm.dll
0x71590000 0x00010000 C:\Windows\System32\nlaapi.dll
0x713A0000 0x0000D000 C:\Windows\system32\dhcpcsvc6.DLL
0x70E00000 0x00006000 C:\Windows\system32\rasadhlp.dll

Called from TOLEAUTO:SEND(0)
Called from _XMLQUERY(144) in onasset.prg
Called from MAIN(106) in onasset.prg
------------------------------------------------------------------------
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 693
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: Ole unrecoverable error

Postby darioflores » Thu Aug 24, 2017 10:00 am

Hello, try using:
CreateObject("MSXML2.ServerXMLHTTP.6.0")
darioflores
 
Posts: 17
Joined: Tue Oct 06, 2015 7:06 am

Re: Ole unrecoverable error

Postby cdmmaui » Thu Aug 24, 2017 10:05 am

Thank you so much! That fixed it!
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 693
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 30 guests