package LoadGPDispatch; use strict; use Win32; use Win32::OLE; my %RegHash; use Win32::TieRegistry( TiedHash => \%RegHash ); my $installKey = $RegHash{"HKEY_LOCAL_MACHINE\\Software\\ESRI\\Desktop10.0\\CoreRuntime"}; my ( $installDir, $type ) = $installKey->GetValue("InstallDir"); my $DLLName = "$installDir\\bin\\AppInitializerLib.dll"; Win32::LoadLibrary($DLLName) || die $!; my $dispatch = Win32::OLE->new("esriGeoprocessing.GpDispatch.1") || die $!; print "Success.\n";
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.