Click here to Skip to main content
15,891,864 members
Home / Discussions / C#
   

C#

 
GeneralRe: ObjectStream Pin
Skippums28-Jan-08 8:56
Skippums28-Jan-08 8:56 
GeneralManaged COM, static constructors, and paths Pin
Dan Neely28-Jan-08 8:08
Dan Neely28-Jan-08 8:08 
I'll state first off I'm not entirely certain if this, or the COM board is the most appropriate venue because it overlaps several issues. I'm trying here first since it has the largest audience.

I'm developing a managed COM wrapper for some existing C# components for use in a VBA (excel) application. One of them is a static class around a configuration file. Its constructor uses System.Windows.Forms.Application.StartupPath + "\relativePath\filename.ini" to construct the path to the data file.

In my VBA application StartupPath returns the path to Excel.exe, not the .XLS file with the VBA code or the COM DLL. Nor can I find a way to get the path to either of those files (both of which could be used to construct the path) programmatically. Because the constructor is static, I can't pass the path in as a parameter.

Without changing the behavior of the ini reader to move initialization outside of the constructor, is there any way around this problem?

Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop.
-- Matthew Faithfull

GeneralRe: Managed COM, static constructors, and paths Pin
Skippums28-Jan-08 9:14
Skippums28-Jan-08 9:14 
GeneralRe: Managed COM, static constructors, and paths Pin
Dan Neely28-Jan-08 10:35
Dan Neely28-Jan-08 10:35 
GeneralMessage Closed Pin
28-Jan-08 8:00
Member 462175228-Jan-08 8:00 
GeneralRe: test Pin
Member 462175228-Jan-08 8:02
Member 462175228-Jan-08 8:02 
GeneralRe: test Pin
Ennis Ray Lynch, Jr.28-Jan-08 8:06
Ennis Ray Lynch, Jr.28-Jan-08 8:06 
GeneralRe: test Pin
Member 462175228-Jan-08 8:07
Member 462175228-Jan-08 8:07 
GeneralRe: test Pin
Member 462175228-Jan-08 8:24
Member 462175228-Jan-08 8:24 
GeneralA window opening problem Pin
DSdragondude28-Jan-08 7:54
DSdragondude28-Jan-08 7:54 
GeneralRe: A window opening problem Pin
LongRange.Shooter28-Jan-08 8:10
LongRange.Shooter28-Jan-08 8:10 
GeneralRe: A window opening problem Pin
DSdragondude28-Jan-08 8:27
DSdragondude28-Jan-08 8:27 
GeneralRe: A window opening problem Pin
MarkB77728-Jan-08 9:24
MarkB77728-Jan-08 9:24 
Generalwriting quotes with data to a text file..not quite what I wanted as output Pin
LongRange.Shooter28-Jan-08 7:51
LongRange.Shooter28-Jan-08 7:51 
GeneralRe: writing quotes with data to a text file..not quite what I wanted as output Pin
PIEBALDconsult28-Jan-08 8:19
mvePIEBALDconsult28-Jan-08 8:19 
GeneralRe: writing quotes with data to a text file..not quite what I wanted as output Pin
LongRange.Shooter28-Jan-08 8:24
LongRange.Shooter28-Jan-08 8:24 
GeneralRe: writing quotes with data to a text file..not quite what I wanted as output Pin
PIEBALDconsult28-Jan-08 8:42
mvePIEBALDconsult28-Jan-08 8:42 
GeneralProblem solved Pin
LongRange.Shooter28-Jan-08 8:52
LongRange.Shooter28-Jan-08 8:52 
GeneralRe: writing quotes with data to a text file..not quite what I wanted as output Pin
PIEBALDconsult28-Jan-08 8:53
mvePIEBALDconsult28-Jan-08 8:53 
QuestionHow to update Outlook appointments Pin
NewToAspDotNet28-Jan-08 6:59
NewToAspDotNet28-Jan-08 6:59 
GeneralGDI+ Performance Pin
#realJSOP28-Jan-08 6:30
mve#realJSOP28-Jan-08 6:30 
GeneralRe: GDI+ Performance Pin
Judah Gabriel Himango28-Jan-08 7:02
sponsorJudah Gabriel Himango28-Jan-08 7:02 
GeneralRe: GDI+ Performance Pin
Ennis Ray Lynch, Jr.28-Jan-08 8:07
Ennis Ray Lynch, Jr.28-Jan-08 8:07 
GeneralRe: GDI+ Performance Pin
#realJSOP28-Jan-08 8:30
mve#realJSOP28-Jan-08 8:30 
GeneralRe: GDI+ Performance Pin
Mike Hankey28-Jan-08 11:13
mveMike Hankey28-Jan-08 11:13 

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.