.NET components

rhnavc
Member Posts: 11
Hi,
I'm struggling to find .NET equivalents for current used COM Automations. Any help or hint in the right direction would be very helpful. Currently open .NET equivalents for COM components are:
- Microsoft Scripting Runtime
- Microsoft Shell Controls and Automation
- Microsoft Script Control 1.0
- Microsoft VBScript Regular Expressions 5.5
- Navision Contact Search 1.0
Thanks in advance.
I'm struggling to find .NET equivalents for current used COM Automations. Any help or hint in the right direction would be very helpful. Currently open .NET equivalents for COM components are:
- Microsoft Scripting Runtime
- Microsoft Shell Controls and Automation
- Microsoft Script Control 1.0
- Microsoft VBScript Regular Expressions 5.5
- Navision Contact Search 1.0
Thanks in advance.
0
Answers
-
Hi,
It's difficult to suggest a .Net replacement to COM without knowing what you are trying to implement.
The Microsoft Scripting Runtime can be used to work with files or folder (and other stuff).
To use files you have one .NET component, to use files you have another.
My suggestion is to find what features you use from each COM and find the correct .NET component to use.
Regards,
parm0 -
My apologies if I asked the wrong way. I'll try to be more specific this time. I'm looking for .NET equivalents for the 'Windows Script Host Object Model' COM component and its WshShell, IWshExec, WshNetwork and IWshCollection classes.
C/AL examples:
WshShell.SendKeys(Parameter);
EXIT(WshShell.RegRead(Parameter));
EXIT(WshShell.AppActivate(Parameter));
WshExec := WshShell.Exec(Parameter);
EXIT(WshShell.Run(Parameter));
EXIT(WshExec.Status);
WshCollection := WshNetwork.EnumNetworkDrives;;
EXIT(WshCollection.Count);
Would appreciate any help/hint in the right direction.0 -
Hi,
For SendKeys try https://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys(v=vs.110).aspx
For RegRead try https://msdn.microsoft.com/en-us/library/aa289494(v=vs.71).aspx
For AppActivate try http://www.vbforums.com/showthread.php?688209-AppActivate-and-FindWindow
Try to google the function name and .net to find more information.
regards,
parm0 -
0
-
For Drives, and for file manipulation in general , the File System Object has a lot of functions.
Name DataType Subtype Length
FSODirectory DotNet System.IO.Directory.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
FSOArray DotNet System.Array.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
FSOFile DotNet System.IO.File.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
FSOPath DotNet System.IO.Path.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Keep in mind that you need to be aware of where your new DotNet calls will execute. By default, they will be on your NAV service tier, not your client, though you can control where they run. When you define a dotnet variable, take a look at its properties and make sure to set RunOnClient as appropriate.Kyle Hardin - ArcherPoint0 -
Thank you all for your input and sorry for my late feedback. I managed to find some .NET alternatives and put them to work, but on the other hand am still missing some.0
-
want to share some examples?0
-
I am very happy to read your about the .net framework component. One point in this article is not clear in terms practicle senario in my mind that is Comman type specification. Please provide good practicle example in terms of different languages so i clears .0
-
kylehardin wrote: »For Drives, and for file manipulation in general , the File System Object has a lot of functions.
Name DataType Subtype Length
FSODirectory DotNet System.IO.Directory.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
FSOArray DotNet System.Array.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
FSOFile DotNet System.IO.File.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
FSOPath DotNet System.IO.Path.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Keep in mind that you need to be aware of where your new DotNet calls will execute. By default, they will be on your NAV service tier, not your client, though you can control where they run. When you define a dotnet variable, take a look at its properties and make sure to set RunOnClient as appropriate.
Hy Kyle,
I tried to implement the "Path" Assembly in NAV 2009 and run it the classic client:
ReturnText := Path.GetFullPath(p_Text);
MESSAGE(ReturnText);
but at runtime I get the following error:
The .NET interop type cannot be used in code for the Classic CSide runtime.
The variable is set to RunOnClient = Yes.0 -
DotNet variables can only be used in RTC.Kyle Hardin - ArcherPoint0
-
Hello, does anybody know if there is a .NET assembly equivalent to the MS Script Control 1.0. COM component?
I need to map the ScriptControl.Language and ScriptControl.Eval methods to any equivalent .NET methods.
CREATE(MSScriptControl,FALSE,TRUE) ;
MSScriptControl.Language('VBScript');
vResult := MSScriptControl.Eval(Formula);0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions