Click here to Skip to main content
15,920,956 members
Home / Discussions / C#
   

C#

 
QuestionHow to send request to php page using POST method Pin
Alex Getman27-Apr-04 22:58
Alex Getman27-Apr-04 22:58 
AnswerRe: How to send request to php page using POST method Pin
Heath Stewart28-Apr-04 3:26
protectorHeath Stewart28-Apr-04 3:26 
GeneralRe: How to send request to php page using POST method Pin
Alex Getman28-Apr-04 5:04
Alex Getman28-Apr-04 5:04 
GeneralRe: How to send request to php page using POST method Pin
Heath Stewart28-Apr-04 10:23
protectorHeath Stewart28-Apr-04 10:23 
GeneralRe: How to send request to php page using POST method Pin
Alex Getman28-Apr-04 20:25
Alex Getman28-Apr-04 20:25 
GeneralRe: How to send request to php page using POST method Pin
Heath Stewart29-Apr-04 3:06
protectorHeath Stewart29-Apr-04 3:06 
GeneralOut of Process Server in C# Pin
Colin Herkes27-Apr-04 21:05
Colin Herkes27-Apr-04 21:05 
GeneralRe: Out of Process Server in C# Pin
Heath Stewart28-Apr-04 3:17
protectorHeath Stewart28-Apr-04 3:17 
See Nick's article, Creating a CCW for COM-enabled Non-.NET Applications[^] and follow the same things, paying attention to the note I prompted him to add about not using auto-generated class interfaces.

Then you register the executable as you would a DLL. Take a look at this sample:
using System;
using System.Drawing;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;

[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyKeyFile(@"C:\Path\To\KeyFile.snk")] // sn.exe -k KeyFile.snk

namespace Test
{
  [Guid("0eea66bf-21bf-4c8c-8678-ad58106343a7")]
  [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
  public interface ITest
  {
    [DispId(0)]
    DialogResult ShowDialog();
  }

  [ClassInterface(ClassInterfaceType.None)]
  [Guid("861e1098-7705-4686-945e-236a0ef439ef")]
  [ProgId("Test.Test")]
  public class Test : Form, ITest
  {
    static void Main()
    {
      Application.Run(new Test());
    }

    public Test()
    {
      SuspendLayout();

      Text = "Out-of-Proc Server Test";

      Label lbl = new Label();
      Controls.Add(lbl);
      lbl.Location = new Point(8, 8);
      lbl.Text = "Hello, world!";

      ResumeLayout();
    }
  }
}
Compile it and run:
regasm.exe /tlb /codebase Test.exe
Finally, I create a very simple JScript file that I ran with cscript.exe (Windows Scripting console host):
var test = new ActiveXObject("Test.Test");
test.ShowDialog();
The important thing is that your interfaces are dispatch interfaces (or dual) so that the script engine can find and invoke your members.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Out of Process Server in C# Pin
Colin Herkes29-Apr-04 21:24
Colin Herkes29-Apr-04 21:24 
GeneralRe: Out of Process Server in C# Pin
Heath Stewart30-Apr-04 2:57
protectorHeath Stewart30-Apr-04 2:57 
GeneralRe: Out of Process Server in C# Pin
Colin Herkes3-May-04 0:19
Colin Herkes3-May-04 0:19 
GeneralRe: Out of Process Server in C# Pin
Heath Stewart3-May-04 1:49
protectorHeath Stewart3-May-04 1:49 
GeneralRe: Out of Process Server in C# Pin
Colin Herkes3-May-04 2:54
Colin Herkes3-May-04 2:54 
GeneralRe: Out of Process Server in C# Pin
Heath Stewart3-May-04 3:18
protectorHeath Stewart3-May-04 3:18 
GeneralRe: Out of Process Server in C# Pin
leppie28-Apr-04 8:39
leppie28-Apr-04 8:39 
GeneralRe: Out of Process Server in C# Pin
Colin Herkes29-Apr-04 21:26
Colin Herkes29-Apr-04 21:26 
GeneralRe: Out of Process Server in C# Pin
leppie30-Apr-04 6:55
leppie30-Apr-04 6:55 
GeneralDirect X Pin
mookeroo27-Apr-04 15:37
mookeroo27-Apr-04 15:37 
GeneralRe: Direct X Pin
Heath Stewart27-Apr-04 17:11
protectorHeath Stewart27-Apr-04 17:11 
GeneralCommenting for comment web page Pin
Jon G27-Apr-04 13:14
Jon G27-Apr-04 13:14 
GeneralRe: Commenting for comment web page Pin
Jeff Varszegi27-Apr-04 14:57
professionalJeff Varszegi27-Apr-04 14:57 
GeneralRe: Commenting for comment web page Pin
Jon G28-Apr-04 0:50
Jon G28-Apr-04 0:50 
GeneralRe: Commenting for comment web page Pin
Jeff Varszegi28-Apr-04 12:30
professionalJeff Varszegi28-Apr-04 12:30 
QuestionHow detect listview's columns resize event? Pin
machocr27-Apr-04 10:52
machocr27-Apr-04 10:52 
AnswerRe: How detect listview's columns resize event? Pin
Heath Stewart27-Apr-04 12:25
protectorHeath Stewart27-Apr-04 12:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.