Update "Error #0 (API error code: 1400) DllStructCreate"

Update "Error #0 (API error code: 1400) DllStructCreate"

Postby pasha » 24.04.2018, 23:27

WSUSOffline 11.2.2 on Host machine: Windows 8.1 x64. Download goes smoothly. No download errors. Update throws "Error #0 (API error code: 1400) when calling DllStructCreate". Previously ran without issues.

WSUSOffline 11.2.2 on new VMWare Windows 10 (1709) running on host machine above both downloads and updates successfully without issue, using host for connection. I can't find any record of the error and have no idea what the issue is.

Please assist.
pasha
 
Posts: 3
Joined: 24.04.2018, 23:12

Re: Update "Error #0 (API error code: 1400) DllStructCreate"

Postby aker » 25.04.2018, 01:26

I assume UpdateInstaller.exe throws this error?
Could you post the patch level of the host machine (the Windows 8.1 one)? [It would be enough to know, when it was updated the last time and from which source]
Which medium did you use to install the System. (I'm not interested in knowing, if it was a DVD or an USB-key; I'm interested in, which Windows image it was (some OEM DVD, Recovery image stored on the HDD, MCT image, some MSDN ISO, ...))
How do you start UpdateInstaller? Where do you store wsusou (local HDD, DVD, USB, Network)? Does your user have administrative rights? Is UAC enabled?
Could you start an administrative command prompt and start UpdateInstaller from there?
Code: Select all
cd /d "<path to wsusou>\client\"
.\UpdateInstaller.exe


@Dalai
@WSUSUpdateAdmin
Which API does AutoIt3 use for "DllStructCreate"?
Which DLL does this depend on?
Other ideas?

From the AutoIt3 source code:
Code: Select all
Global Const $ERROR_INVALID_WINDOW_HANDLE = 1400 ; Invalid window handle.
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to sell it.
aker
aker
 
Posts: 3015
Joined: 02.03.2011, 16:32
Location: /dev/kmem

Re: Update "Error #0 (API error code: 1400) DllStructCreate"

Postby Dalai » 25.04.2018, 03:17

aker wrote:I assume UpdateInstaller.exe throws this error?

Yes, there's only one location this message can originate from: lines 1037 to 1049 in UpdateInstaller.au3, related to the preparation to disable WOW64 redirection.

Which API does AutoIt3 use for "DllStructCreate"?

Good question. Since AutoIt isn't Open Source anymore (it was a loooong time ago) and DllStructCreate is not part of the source I have lying around (version 3.1.0 from 2005), I don't know if and how it's possible to answer that question. I'm wondering why DllStructCreate would need a window handle... Maybe the error code comes from an earlier code segment, despite the call to _WinAPI_SetLastError(0) immediately before creating the struct?

Which DLL does this depend on?

I would guess kernel32.dll or some other core DLL. I'm not sure if AutoIt uses Visual C++ components or DLLs. It doesn't appear in the import table of the (non-UPXed) UpdateInstaller.exe, so I guess it doesn't need the VC++ redistributables, despite AutoIt itself being compiled with Visual C++; the linker version says 12.0 which is VC++ 2013.

Other ideas?

Maybe watch the execution of UpdateInstaller in Process Monitor to get more details on what goes wrong? Unfortunately it's not so easy to debug scripts which throw an error only on a specific system. Perhaps it's better to remove the call to _WinApi_GetLastError after DllStructCreate since it doesn't serve a purpose there (DllStructCreate is an AutoIt function that shouldn't create a WinAPI error).

Regards
Dalai
Dalai
 
Posts: 584
Joined: 12.07.2016, 22:00

Re: Update "Error #0 (API error code: 1400) DllStructCreate"

Postby WSUSUpdateAdmin » 25.04.2018, 09:59

Hi.

Dalai wrote:Perhaps it's better to remove the call to _WinApi_GetLastError after DllStructCreate since it doesn't serve a purpose there (DllStructCreate is an AutoIt function that shouldn't create a WinAPI error).

Aye, will do so.
Wow64DisableWow64FsRedirection should fail (and exit) anyway if the Pointer created by DllStructCreate before is invalid.

Thanks & Cheers,
Torsten
WSUSUpdateAdmin
Administrator
 
Posts: 2113
Joined: 07.07.2009, 15:38

Re: Update "Error #0 (API error code: 1400) DllStructCreate"

Postby pasha » 26.04.2018, 00:30

UpdateInstaller.exe is what throws the error.

I used cmd(admin) and cd to the directory, then ran updateinstaller. Same error. Previously, I simply right-clicked on updateinstaller and ran as admin. Additionally (I forgot to include this in my first post), I created an iso through the wsusoffline application and attempted to install that way: same error.

When I couldn't get the installer to run, I updated the Windows 8.1 machine manually, using the wsusoffline cab files that I downloaded, so it is now up to date. There were only a few of the recent update cabs that were needed.

When updateinstaller is called either run as admin or cmd(admin): does the installer need access to any MS server, prior to beginning the installation, i.e., after it has successfully downloaded the update files?

I apologize for not getting back sooner. Weekends will permit more thorough answers. I appreciate and will follow up on any suggestions or additional information requested. Thanks again.
pasha
 
Posts: 3
Joined: 24.04.2018, 23:12

Re: Update "Error #0 (API error code: 1400) DllStructCreate"

Postby Dalai » 26.04.2018, 01:03

pasha wrote:When updateinstaller is called either run as admin or cmd(admin): does the installer need access to any MS server, prior to beginning the installation, i.e., after it has successfully downloaded the update files?

No, it doesn't. That's where the "Offline" part in WSUS Offline Update comes from. Only UpdateGenerator needs internet access, after that, everything can be used offline. Although sometimes the system tries to get online to verify digital signatures when installing something - this can be observed with the setup of e.g. Classic Shell on a system with an invalid gateway, where the installation takes a couple of minutes instead of just seconds (had to do that a lot in the last couple months, but that's OT).

It's important to note that the error you experience has nothing to do with blocked internet access. We're still unsure of why this is happening (only on your system so far), but we've taken some steps to change WSUS Offline to work around the issue.

Regards
Dalai
Dalai
 
Posts: 584
Joined: 12.07.2016, 22:00

Re: Update "Error #0 (API error code: 1400) DllStructCreate"

Postby pasha » 26.04.2018, 01:06

Sorry, aker. Missed your additional questions.

Which medium did you use to install the System? - I used an iso download of the Pro version from MS with pro key.
Where do you store wsusou? - I have a folder for admin tools on my desktop (c:\users\[username]\desktop\tools) on HDD
UAC enabled? - Yes, but I always run system applications like wsusoffline as admin.

Thank you.
pasha
 
Posts: 3
Joined: 24.04.2018, 23:12

Re: Update "Error #0 (API error code: 1400) DllStructCreate"

Postby boco » 26.04.2018, 07:41

Don't use WOU from the Desktop. The Desktop folder is borderline schizophrenic, it actually contains of multiple directories. As a virtual folder, there can be problems; additionally, it is subject to UAC System Folder protection.

Short path directly below C:\, eg C:\WOU is recommended.
Microsoft update catalog: http://catalog.update.microsoft.com/v7/site/
Windows Install media download: https://support.microsoft.com/en-us/help/15088/windows-create-installation-media
boco
 
Posts: 1978
Joined: 24.11.2009, 18:00
Location: Germany

Re: Update "Error #0 (API error code: 1400) DllStructCreate"

Postby Dalai » 26.04.2018, 18:14

@boco:
It's correct that the Desktop itself is a virtual folder, i.e. a combination or virtual view of public desktop (%AllUsersProfile%\Desktop) and the user desktop (%UserProfile%\Desktop). But the desktop folder mentioned by pasha is not a virtual folder, it's a normal directory. However, I agree that it's better to use a generic path to avoid issues resulting from long paths and such.

Regards
Dalai
Dalai
 
Posts: 584
Joined: 12.07.2016, 22:00

Re: Update "Error #0 (API error code: 1400) DllStructCreate"

Postby aker » 26.04.2018, 22:25

@pasha
Could you move wsusou to a path e.g. C:\WOU and run it using the command prompt?
Start the command prompt with administrative rights and use these commands to start UpdateInstaller
Code: Select all
cd /d "C:\WOU\client"
.\UpdateInstaller.exe
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to sell it.
aker
aker
 
Posts: 3015
Joined: 02.03.2011, 16:32
Location: /dev/kmem


Return to Installation / Updating

Who is online

Users browsing this forum: No registered users and 12 guests