Click here to Skip to main content
15,916,189 members
Home / Discussions / C#
   

C#

 
GeneralRe: win Forms Pin
Stefan Troschuetz15-Mar-07 11:44
Stefan Troschuetz15-Mar-07 11:44 
AnswerRe: win Forms Pin
MoustafaS15-Mar-07 11:21
MoustafaS15-Mar-07 11:21 
GeneralRe: win Forms Pin
marwan_siala15-Mar-07 11:33
marwan_siala15-Mar-07 11:33 
GeneralRe: win Forms Pin
MoustafaS15-Mar-07 11:40
MoustafaS15-Mar-07 11:40 
GeneralRe: win Forms Pin
Stefan Troschuetz15-Mar-07 11:51
Stefan Troschuetz15-Mar-07 11:51 
AnswerRe: win Forms Pin
Keshav V. Kamat15-Mar-07 20:00
Keshav V. Kamat15-Mar-07 20:00 
AnswerRe: win Forms [modified] Pin
marwan_siala16-Mar-07 4:00
marwan_siala16-Mar-07 4:00 
QuestionDynamic interop question Pin
Member 9615-Mar-07 10:45
Member 9615-Mar-07 10:45 
I've written a program to interface between Peachtree accounting and my application. No problems, everything works fine, however I want to streamline things.

To support Peachtree 2007 and 2006 requires a different Interop assembly to be generated. No problems there either, here's the problem: In my app, there is only 3 lines of code difference between using the 2006 and 2007 interop assemblies.

The Import method for 2007 supports returning a list of Guid's that were imported which I want to keep, and the 2006 version doesn't.

Currently I'm looking at having to use preprocessor directives to conditionally compile for the different Import methods and changing the references in my project before building.

This isn't ideal, I'd like to do it in code dynamically instead so at runtime it can work with either version by using the appropriate interop assembly.

I'm a bit mystified as to how to accomplish this. If I generate two interops named differently, let's say Interop.PT2006.dll and Interop.PT2007.dll and reference them both in my app then I'll have two interops in the same namespace clashing on all the methods which are for the most part identical.

I could change the namespaces, but then I'd have to futz around in my code all over the place to call the appropriate namespaced method and it would be a mess.

I guess I need to dynamically reference the correct interop at run time and somehow dynamically call the 3 methods that are slightly different in the interop at run time.

I just need a general kick in the right direction for this.

Any suggestions appreciated.
Questionwhen doing an impersonation class, error? Pin
cpltek15-Mar-07 10:37
cpltek15-Mar-07 10:37 
AnswerRe: when doing an impersonation class, error? Pin
Dave Kreskowiak15-Mar-07 13:16
mveDave Kreskowiak15-Mar-07 13:16 
GeneralRe: when doing an impersonation class, error? [modified] Pin
cpltek16-Mar-07 3:43
cpltek16-Mar-07 3:43 
GeneralRe: when doing an impersonation class, error? Pin
Dave Kreskowiak16-Mar-07 12:48
mveDave Kreskowiak16-Mar-07 12:48 
GeneralRe: when doing an impersonation class, error? Pin
cpltek16-Mar-07 14:11
cpltek16-Mar-07 14:11 
Questionwindows installer Pin
arkiboys15-Mar-07 9:42
arkiboys15-Mar-07 9:42 
AnswerRe: windows installer Pin
MoustafaS15-Mar-07 11:44
MoustafaS15-Mar-07 11:44 
QuestionDefaultValueAtribute Pin
alexeychik200115-Mar-07 8:39
alexeychik200115-Mar-07 8:39 
AnswerRe: DefaultValueAtribute Pin
mav.northwind15-Mar-07 9:28
mav.northwind15-Mar-07 9:28 
GeneralRe: DefaultValueAtribute Pin
alexeychik200115-Mar-07 9:47
alexeychik200115-Mar-07 9:47 
GeneralRe: DefaultValueAtribute Pin
mav.northwind15-Mar-07 9:54
mav.northwind15-Mar-07 9:54 
GeneralRe: DefaultValueAtribute Pin
alexeychik200115-Mar-07 10:03
alexeychik200115-Mar-07 10:03 
GeneralRe: DefaultValueAtribute Pin
Sean Michael Murphy15-Mar-07 10:31
Sean Michael Murphy15-Mar-07 10:31 
GeneralRe: DefaultValueAtribute Pin
alexeychik200115-Mar-07 10:46
alexeychik200115-Mar-07 10:46 
GeneralRe: DefaultValueAtribute Pin
Sean Michael Murphy15-Mar-07 11:22
Sean Michael Murphy15-Mar-07 11:22 
Questionfilesystem listview Pin
alpdoruk15-Mar-07 8:24
alpdoruk15-Mar-07 8:24 
AnswerRe: filesystem listview Pin
Ed.Poore19-Mar-07 13:10
Ed.Poore19-Mar-07 13:10 

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.