Click here to Skip to main content
15,888,590 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to display image at client site?? Pin
Bluebamboo5-Jul-06 11:20
Bluebamboo5-Jul-06 11:20 
GeneralRe: How to display image at client site?? Pin
led mike6-Jul-06 4:45
led mike6-Jul-06 4:45 
QuestionHow to count total properties in a class. Pin
sun255-Jul-06 6:58
sun255-Jul-06 6:58 
AnswerRe: How to count total properties in a class. Pin
Josh Smith5-Jul-06 7:14
Josh Smith5-Jul-06 7:14 
GeneralRe: How to count total properties in a class. Pin
sun255-Jul-06 21:22
sun255-Jul-06 21:22 
QuestionVBA and .NET Pin
rattack5-Jul-06 5:59
rattack5-Jul-06 5:59 
AnswerRe: VBA and .NET Pin
ToddHileHoffer5-Jul-06 6:01
ToddHileHoffer5-Jul-06 6:01 
GeneralRe: VBA and .NET Pin
rattack5-Jul-06 23:12
rattack5-Jul-06 23:12 
it's .NET COM object, so I used "regasm CodeLibrary1.dll /codebase".
There were some little mistakes in namespace and ProgID in my code. So here is the final variant:

using System;
using System.Runtime.InteropServices;

namespace ClassLibrary1
{
[GuidAttribute("1C6CD700-A37B-4295-9CC9-D7392FDD425D"),
InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IFoo
{
[DispId(1)]
string PrintMe();
[DispId(2)]
int ShowState();
[DispId(3)]
void SetState(int newState);
}

[GuidAttribute("C09E2DD6-03EE-4fef-BB84-05D3422DD3D9"),
ClassInterfaceAttribute(ClassInterfaceType.None)]
[ProgIdAttribute("ClassLibrary1.Foo")]
public class Foo : IFoo
{
public Foo() { }
private int state = 100;

public string PrintMe()
{
return ("TEST SUCCESS");
}

public int ShowState()
{
return (state);
}

public void SetState(int newState)
{
state = newState;
}
}
}

Now using CreateObject or New gets the same error: "Run-time error -2147024894 (80070002). File or assembly Classlibrary1, or one of it's dependencies was not found".


QuestionI wanna to format any date like SQL Date without changing Regional setting? Pin
3DoorsDown5-Jul-06 4:35
3DoorsDown5-Jul-06 4:35 
AnswerRe: I wanna to format any date like SQL Date without changing Regional setting? Pin
ToddHileHoffer5-Jul-06 5:17
ToddHileHoffer5-Jul-06 5:17 
AnswerRe: I wanna to format any date like SQL Date without changing Regional setting? Pin
Colin Angus Mackay5-Jul-06 5:17
Colin Angus Mackay5-Jul-06 5:17 
AnswerRe: I wanna to format any date like SQL Date without changing Regional setting? Pin
Martin#5-Jul-06 5:17
Martin#5-Jul-06 5:17 
QuestionShadowcopy Pin
kokilambal.p5-Jul-06 4:00
kokilambal.p5-Jul-06 4:00 
AnswerRe: Shadowcopy Pin
Josh Smith5-Jul-06 7:15
Josh Smith5-Jul-06 7:15 
GeneralRe: Shadowcopy Pin
Not Active5-Jul-06 7:49
mentorNot Active5-Jul-06 7:49 
GeneralRe: Shadowcopy Pin
Josh Smith5-Jul-06 10:21
Josh Smith5-Jul-06 10:21 
GeneralRe: Shadowcopy Pin
kokilambal.p5-Jul-06 21:21
kokilambal.p5-Jul-06 21:21 
QuestionC# Cross-Class function calls Pin
czell5-Jul-06 3:57
czell5-Jul-06 3:57 
AnswerRe: C# Cross-Class function calls Pin
BoneSoft5-Jul-06 4:14
BoneSoft5-Jul-06 4:14 
AnswerRe: C# Cross-Class function calls Pin
Jun Du5-Jul-06 4:31
Jun Du5-Jul-06 4:31 
GeneralRe: C# Cross-Class function calls Pin
led mike5-Jul-06 6:33
led mike5-Jul-06 6:33 
QuestionHow to find 24Hrs Back Time Pin
VenkataRamana.Gali5-Jul-06 3:34
VenkataRamana.Gali5-Jul-06 3:34 
AnswerRe: How to find 24Hrs Back Time Pin
stancrm5-Jul-06 3:39
stancrm5-Jul-06 3:39 
AnswerRe: How to find 24Hrs Back Time Pin
MatthewAnderson5-Jul-06 3:40
MatthewAnderson5-Jul-06 3:40 
GeneralRe: How to find 24Hrs Back Time Pin
Guffa5-Jul-06 4:03
Guffa5-Jul-06 4:03 

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.