kodhework / kodnet Goto Github PK
View Code? Open in Web Editor NEWLibrary and helpers for access to all .NET objects/classes/controls from VFP
License: Other
Library and helpers for access to all .NET objects/classes/controls from VFP
License: Other
Since NET Standard (and Net Core) are pretty stable and they will be the future with NET 5, will this library support the new versions?
Or do you have other suggestions?
OLE IDispatch exception code 0 from mscorlib: Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type...
I Think we needs more examples, maybe we can share each others as well we creates somes solutions.
I have no way to get Classes from System.IO.DLL like FILE OR FILESTREAM either Enum like System.IO.FileMode Enum
Apart, i run this code and toesnt work for me
directoriesClass = _screen.dotnet4.getStaticWrapper("System.IO.Directory") y receive the
errr can get a wrapper for the type System.IO.Directory, i will like to expect the error messages more explainded.
I will to Thank you to make this Utility possible.
I was wondering if it was possible to automate Outlook from FoxPro using kodnet (the endgame is to see if we can overcome the 32 bit limitation, as now we need to keep installing office 32 bits to be able to use automation from FoxPro) so I tried this two methods, they both fail in the last line, you can see that I did not get far, as the object returned seems to be an empty shell without properties or methods (but no error), anyways, this is the code I tried:
local OutlookApplicationClass, OutlookApplicationObject
_screen.kodnet.loadAssemblyFile("C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Outlook\15.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Outlook.dll")
m.OutlookApplicationClass = _screen.kodnet.getStaticWrapper("Microsoft.Office.Interop.Outlook.Application")
m.OutlookApplicationObject = m.OutlookApplicationClass.construct() && << OutlookApplicationClass is an object without visible methods or properties
** This looks better as we do not need to put all the gibberish path as above
_screen.dotnet4.loadAssemblyPartialName('Outlook.Application')
_screen.dotnet4.getStaticWrapper("Microsoft.Office.Interop.Outlook.Application")
m.OutlookApplicationObject = m.OutlookApplicationClass.construct() && Empty object none the less
I am using VFP 9 SP2, Outlook 2013 32 bits and Windows 10 64
TIA,
Hugo
VFP 9 SP2 with latest hotfix 7423
Windows 10 Home Single Language 64-bit
Installed .Net Framework 4.5.1 and 4.5.2
Run sample: webcam
Hi,
I have problems with the next code:
do fullpath("kodnet.prg")
TEXT TO m.code noshow
using System;
using System.Collections.Generic;
using System.IO;
public class program{
public static void main(){
}
}
namespace Compiled
{
public class outliers{
public double index { get; set; }
public double replacements { get; set; }
}
public class datos{
public double consumo { get; set; }
}
public class Test
{
public List<outliers> Routliers(ref double[,] datos) {
List<outliers> resultado = new List<outliers>();
for (int i = 0; i <= 19 - 1; i++)
{
resultado.Add(new outliers { index = datos[i,1], replacements = datos[i,1] });
}
return resultado;
}
public static int ExecuteFunc(Func<string,int> func)
{
return func("Method executed from .NET");
}
public static int ExecuteFunc(Func<string,int> func, string message)
{
return func(message);
}
public static int ExecuteFunc(Func<string,int,string,int> func, string message, int option, string title)
{
return func(message,option,title);
}
}
}
ENDTEXT
LOCAL engine
engine = _screen.kodnet.getStaticWrapper("jxshell.csharplanguage").construct()
m.engine.Runscript(m.code)
asem = m.engine.getCompiledAssembly()
_Screen.kodnet.loadAssembly(m.asem)
LOCAL ARRAY m_datos(19, 1) as Double
m_datos(1,1) = 378
m_datos(2,1) = 327
m_datos(3,1) = 311
m_datos(4,1) = 329
m_datos(5,1) = 801
m_datos(6,1) = 1238
m_datos(7,1) = 449
m_datos(8,1) = 408
m_datos(9,1) = 452
m_datos(10,1) = 442
m_datos(11,1) = 947
m_datos(12,1) = 1617
m_datos(13,1) = 451
m_datos(14,1) = 495
m_datos(15,1) = 489
m_datos(16,1) = 391
m_datos(17,1) = 1182
m_datos(18,1) = 1132
m_datos(19,1) = 380
resultado = test.Routliers(m_datos)
FOR n = 0 TO resultado.COUNT - 1
? ALLTRIM(STR(resultado.item(n).index)) + " - " + ALLTRIM(STR(resultado.item(n).replacements, 10,2))
ENDFOR
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.