wwDotnetBridge
InitializeDotnetVersion("V4") takes several seconds to execute
Gravatar is a globally recognized avatar based on your email address. InitializeDotnetVersion("V4") takes several seconds to execute
  Manni Borg
  All
  Sep 5, 2025 @ 06:57am

Hello,

since a couple of days, the command

InitializeDotnetVersion("V4")

suddenly takes about 8 seconds to execute, what could be the reason? I'm using Version 7.33 of wwDotnetBridge.

I initialize it this way:

DO wwDotnetBridge
InitializeDotnetVersion("V4")
loBridge = CREATEOBJECT("wwDotNetBridge","V4")

It is this line inside the wwDotnetBridge.prg load-Function that takes so long to execute:

lnDispHandle = ClrCreateInstanceFrom(FULLPATH("wwDotNetBridge.dll"),;
				"Westwind.WebConnection.wwDotNetBridge",@lcError,@lnSize)

I guess it has something to do with Windows Defender, because I uninstalled another Antivirus-Software.

How can I speed up the loading?

Thanks,

Manni

Gravatar is a globally recognized avatar based on your email address. re: InitializeDotnetVersion("V4") takes several seconds to execute
  Rick Strahl
  Manni Borg
  Oct 4, 2025 @ 12:32pm

Sorry I missed this.

Not sure what would cause this, but Anti-Virus or a funky path setup are prime suspects.

If you have a path with a large number of files in your FoxPro path that can slow down finding files. Ideally wwipstuff.dll and wwdotnetbridge.dll should be in your main EXE's path or current folder when running the IDE.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: InitializeDotnetVersion("V4") takes several seconds to execute
  Manni Borg
  Rick Strahl
  Oct 8, 2025 @ 01:58pm

Thank you, Rick. When I deactivate Windows Defender Real-time protection then it is loading very fast.

I tried adding exclusions to Defender but it didn't help, only deactivation helped.

Does it solve the problem to use a signed version of wwDotnetBridge?

Thanks, Manni

Edit: wwDotnetbridge is in the same folder as the VFP exe.

Gravatar is a globally recognized avatar based on your email address. re: InitializeDotnetVersion("V4") takes several seconds to execute
  Rick Strahl
  Manni Borg
  Oct 9, 2025 @ 09:50am

Not sure what that's about. I'm running with real-time Defender settings enabled and I have no delays - wwDotnetBridge loads up instantly.

As to signing - I don't think that will make a difference but the libraries are signed as of the latest release (Open Source published today - they were also signed before - West Wind Client Tools are always signed).

More likely the problem might be related to blocked binaries (Mark of the Web - Blocked File), but if that was the problem it should only occur on the very first load and wwDotnetBridge automatically removes the blocking marker on first launch. But wwDotnetBridge does this only to DLLs it loads directly.

If you launch off a network drive that too can have ill effects for load policy. It also helps to run your application out of Program Files. When installed make sure apps are installed from an installer not from a downloaded Zip file as that marks all files with MOTW and that will cause slow downs or failed runs.

These are just general guidelines not specific to wwDotnetBridge.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: InitializeDotnetVersion("V4") takes several seconds to execute
  Manni Borg
  Rick Strahl
  Oct 10, 2025 @ 01:08am

I found out I was using a signed version of wwDotnetbridge already.

I could reproduce the problem repeatedly when launching wwDotnetBridge from a network drive as well as a local drive. But only when Real time protection of Windows Defender was activated, as soon as I deactivate it, everything is running fast.

Maybe my VFP exe which is calling the bridge has to be signed as well? The delay only appears when calling wwDotnetbridge, nothing else is slow in my VFP app.

Thanks, Manni

Edit: I'll try out the newest version von wwDotnetBrdige to see if the new unblocking function will solve the problem and report back.

© 1996-2026