|
System.IO.Path.GetTempPath() will return the current temp directory.
You may want to look at isolated storage[^] instead, especially if your app will be running in a locked-down environment.
|
|
|
|
|
Well said!
public static string System.IO.Path.GetTempPath() {
StringBuilder local0;
uint local1;
string local2;
new EnvironmentPermission(1).Demand();
local0 = new StringBuilder(260);
local1 = Win32Native.GetTempPath(260, local0);
local2 = local0.ToString();
if (!(local1))
__Error.WinIOError();
return local2;
}
Back to real work : D-25.
|
|
|
|
|
Bah! You need Anakrino to tell you that? I can read it in IL!
You will now find yourself in a wonderous, magical place, filled with talking gnomes, mythical squirrels, and, almost as an afterthought, your bookmarks
-Shog9 teaching Mel Feik how to bookmark
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
|
|
|
|
|
David Stone wrote:
Bah! You need Anakrino to tell you that? I can read it in IL!
You asking for a slap.
you think ur soo cool wiv ur li'l IL book
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
Nnamdi Onyeyiri wrote:
You asking for a slap.
Ah. You don't understand...it's an inside joke.
Nnamdi Onyeyiri wrote:
you think ur soo cool wiv ur li'l IL book
Yeah...that's me...I'm cool...I'm bad...uh-huh oh yeah!
You will now find yourself in a wonderous, magical place, filled with talking gnomes, mythical squirrels, and, almost as an afterthought, your bookmarks
-Shog9 teaching Mel Feik how to bookmark
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
|
|
|
|
|
David Stone wrote:
Ah. You don't understand...it's an inside joke.
Oh, maybe its that you dont understand how lightly that phrase is used here.
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
|
I'm going to use System.IO.Path.GetTempPath() as richard_d suggested. My app is a desktop windows app so I dont think I'll need special storage.
thanks
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
I want to be able to create a program that will parse a flat file into an xml file that a typed dataset can read or parse the flat file into a custom generated typed dataset. Is this possbile and if so how would I use codedom, etc to get this result?
|
|
|
|
|
|
Search MSDN for Interop and API
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
I am writing a code generator that reads in a text file containing source code. The file is my template and it contains {1}, {2}... {n} items in it. I read the file into a string and then I interpolate those values using String.Format(string format, params object[] args). It seems to work fine as long as I don't have any squiggly braces in it ({}) other than the ones that I want to use for formatting (e.g. the {1}, {2}, etc values). It appears that String.Format is choking on the other braces in the code template. I get the exception 'System.FormatException - Input string was not in the correct format'. Does anyone know why this is and how to fix it? Does this makes sense?
Thanks in advance.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Escaping braces is achieved by doubling them. Example : string s = Stirng.Format("my number {{is}} {0}",45);
Back to real work : D-26.
|
|
|
|
|
Gracias!!!
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
hi,
consider using the System.Text.Stringbuilder class ( method AppendFormat ). it is much faster with these kind of string operations.
franz
|
|
|
|
|
HELLO
SIR WE ARE DOING WORD PROGRAMMING USING C SHARP, HAVE PROBLEM IN USING PROPERTIES , AFTER ADDING MSWORD.OLB .
THERE ARE SOME INTERFACES AND CLASSES AS WELL , BUT HAVE PROBLEM IN USING PROPERTIES.
Asim
|
|
|
|
|
WHAT IS THE PROBLEM YOU ARE HAVING? TELL ME NOW. WE HAVE WAYS OF MAKING YOU TALK.
Pete
Insert Sig. Here!
|
|
|
|
|
thanks sir
we eventually have been able to use these properties.thanks for offering some favoure.
now the problem is how to display a picture, i.e we want to open a word document and want to get some picture if any and then to show it, now this is where the problem is we have opened word and got the picture from it but now problem is how to show it.
this is how we got the paragraph from word doc ,
Word.Range rngtext = aDoc.Application.ActiveDocument.Paragraphs.Item(2).Range;
MessageBox.Show(rngtext.Text);
now how to get show the picture?
Asim
|
|
|
|
|
"Capitalize words only to highlight an important point or to distinguish a title or heading. Capitalizing whole words that are not titles is generally termed as SHOUTING! "
the internet etiquette[^].
And, if you re-read your question, you'll probably figure out that we cannot answer anything about it.
Back to real work : D-26.
|
|
|
|
|
Simply press it: some light on the keyboard should turn off.
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
Is your Caps-lock button broken? lol
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Hi, i'm trying to intercept window closing event of the AxSHDocVw.AxWebBrowser object (when a window.close() function is called in javascript) to do some specific task, but the form which contain this control is closed without any closing event raised.
What should i do?
|
|
|
|
|
Overriding Form.OnClosing is enough to get notified when a window is canned.
Back to real work : D-26.
|
|
|
|
|
I have a method on an OCX that takes void* parameter.
.Net create an interopt layer for this OCX and re-maps the void* to IntPtr
When I pass a IntPtr to this method. COM throws a parameter type mismatch exception.
This is because the IntPtr passed to method as a variant type of VT_INT and not VT_VOID.
How do I pass a IntPtr to this method with a variant type VT_VOID
|
|
|
|
|
void* is not a suitable type for the interop marshaller. I would suggest to either rewrite the IDL so it is something like IUnknown* (even if it's not an iunknown interface), or you could as well pass a SafeArray instead : in this case you have a marshall unmanagedtype enum [attribute] to play with to tell the marshaller what is the safearray made of.
Good luck!
Back to real work : D-26.
|
|
|
|