Giter VIP home page Giter VIP logo

kodnet's People

Contributors

julionobre avatar voxsoftware avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kodnet's Issues

Support for NET Standard?

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?

Sample error

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...

System.IO.DLL I cant not get classes or Enums for this Assemble

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.

Outlook E-Mail

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

pass vfp numeric array to modules

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

  • COMPILE C# CODE
    Local asem, test

engine = _screen.kodnet.getStaticWrapper("jxshell.csharplanguage").construct()
m.engine.Runscript(m.code)
asem = m.engine.getCompiledAssembly()
_Screen.kodnet.loadAssembly(m.asem)

  • now you can use the type compiled
    test = _screen.kodnet.getStaticWrapper("Compiled.Test").construct()

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.