|
i tried to create a small application about converting my MS Outlook .pst files to .xml files. After that just open a folder to store it inside.
|
|
|
|
|
I presume you mean the outlook .pst file. If so what leads you to think it can be converted to an XML file. From the little I have worked with Outlook this is a monster, I believe it is a database of mail items.
Or does 2007 store the .pst as XML?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yup.What i mean of .pst files is MS Outlook files. I got an idea to create a small application to convert my MS Outlook .pst files to the .xml files so that i can store it for future use.Is it difficult to do this?
|
|
|
|
|
tchshiping wrote: it difficult to do this?
From this question I assume you have not worked with Outlook much. The data structure inside a PST has got to be horrendous, think about the types of data that is stored Notes, email, contacts, etc etc etc.
Try referencing Outlook and wandering through the properties of the objects in there, this will give you an idea of the complexity. And what if MS changes the internal format/structure on you. This is the overriding reason no one has touched this.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hello, I'm trying to read .pst file in txt form, what i do please help
thanks in advance
|
|
|
|
|
hello
I'm trying to export a function which returns an array of double:
<br />
#ifndef _MATLAB_GENERIC_DLL_H_<br />
#define _MATLAB_GENERIC_DLL_H_<br />
<br />
<br />
#ifdef MATLABGENERICDLL_EXPORTS<br />
#define MATLABGENERICDLL_API __declspec(dllexport)<br />
#else<br />
#define MATLABGENERICDLL_API __declspec(dllimport)<br />
#endif<br />
<br />
<br />
extern "C"<br />
{<br />
<br />
MATLABGENERICDLL_API void FormatDrive();<br />
MATLABGENERICDLL_API void CopyFiles(char* Src, char* Tgt);<br />
MATLABGENERICDLL_API void ToUpper(char* Src);<br />
MATLABGENERICDLL_API char* ToUpper2(char* Src);<br />
MATLABGENERICDLL_API double* GetSomeDoubleArray(char* Src);<br />
}<br />
#endif //_MATLAB_GENERIC_DLL_H_<br />
The actual implementation looks like this:
<br />
MATLABGENERICDLL_API double* GetSomeDoubleArray(char* Src)<br />
{<br />
double SomeArray[10];<br />
<br />
for(int i=0; i<10; i++)<br />
{<br />
if(i>0) {<br />
SomeArray[i] = 1.1 * SomeArray[i-1];<br />
} else {<br />
SomeArray[i] = 0.5;<br />
}<br />
}<br />
return SomeArray;<br />
}<br />
From dotnet/C# code:
<br />
class Program<br />
{<br />
[DllImport(@"C:\MatlabGenericDll.dll")]<br />
private static extern string ToUpper2(string Src);<br />
<br />
[DllImport(@"C:\MatlabGenericDll.dll")]<br />
private static extern double[] GetSomeDoubleArray(string Src);<br />
<br />
static void Main(string[] args)<br />
{<br />
string strTest = "abc";<br />
string strResult = null;<br />
<br />
double[] SomeArray= null;<br />
<br />
try<br />
{<br />
strResult = ToUpper2(strTest);
SomeArray= SomeArray("abcde");
}<br />
catch (Exception ex)<br />
{<br />
Console.WriteLine(ex.ToString());<br />
}<br />
<br />
return;<br />
}<br />
}<br />
Suggestion?!
Thanks
dev
|
|
|
|
|
GetSomeDoubleArray returns a pointer, so you must go unmanaged and get your data starting from that pointer, and put in into an array. I know there's a System.IntPtr type which can help with Int32 data, but I don't know if there's anything for Double s.
But there's a problem with your implementation: you return a pointer to an array declared in the function's scope, which is allocated on the stack and destroyed when the function exits!
So if you absolutely need to return the array you should make it static. You can allocate and deallocate it upon loading and unloading the DLL, either automatically (by a declaration in the main scope) or manually. Watch out for thread safety if you need it, and it's done.
But the best way to solve your problem would be to declare a double[] array on the C# side and pass it by reference to GetSomeDoubleArray - it will save you all the headaches.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
Hello
I've got once again a problem with an application of mine..
Im building and application which checks a defined list of links. This windows form application should be able to run from any computer within our company. We have different security zones and we use a proxy configurated by with a automatic configuration script.
Now for internet website I haven't any problems. I just use the default proxy and fill the credentials with my user informations. But for the websites into the intranet it doesn't work like that. I just always get a 401 (unauthorized) error message.
I know that it's possible to solve that problem without knowing our network security exactly but hopefully anybody has an idea anyway.
Thanks a lot and best reagrds
|
|
|
|
|
how does your application access the link ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Over the System.Net.WebRequest class
WebRequest request = WebRequest.Create(Path);
request.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
(HttpWebResponse)request.GetResponse();
|
|
|
|
|
Remember the way you access your intranet is not the same way you access the internet. so i think you have to create a one function and detect if its internet or Intranet and extract the correct url for each
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
hmm.. This I've already done. I was clear that I have to different between internet and intranet otherwise it had worked. But I dont know how can I access to the intranet.. Any idea?
Thanks for your help!
|
|
|
|
|
Now I just trey by chance the way to read the site over the System.Net.WebClient class and it worked pretty well.
Actually I have no idea where's the difference but for the moment it's enough, when it works. I'll try to find out why later..
|
|
|
|
|
Hi, I want to draw a Hindi text with a bounding box around. Sample text "मैं हिन्दी नहीं बोल सकता हूँ।".
The problem is the last character with dependent vowel sign, the method misses the bottom part of the text.
0x0939, 0x0942, 0x0901 (devanagari letter ha, vowel sign uu, sign candrabindu)
C# code sample
string text = "मैं हिन्दी नहीं बोल सकता हूँ।";
Font font = new Font("Tahoma", 20.0f, FontStyle.Regular);
SizeF layoutArea = new SizeF(1000, 1000);
StringFormat stringFormat = new StringFormat();
SizeF measure = g.MeasureString(text, font, layoutArea, stringFormat);
g.DrawRectangle(Pens.Red, new Rectangle(50, 50, (int)measure.Width, (int)measure.Height));
g.DrawString(text, font, Brushes.Black, 50, 50);
I have also tried C++ functions GetTextExtentPoint32(), GetTextMetrics() and GetOutlineTextMetrics() to get the correct height but failed.
Any suggestions?
Thanks in advance,
Gywox
|
|
|
|
|
I think you are getting the correct height, it is just there is an offset that means the text is down by a couple of pixies.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Which method do I use to get the offset value? I can't find any such in the API.
|
|
|
|
|
Do a bit of testing. There isn't anything that I know of that will tell you. From your code snippet, I took a screen print and you can see that the letters are being printed two px down from the square.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Exactly, but if you select a larger font ("Tahoma", 80.0f) when the error becomes more. So I can't use a fixed value.
|
|
|
|
|
Hi,
The horizontal scroll bar is placed below the panel and when I am trying to move the scroll bar the event didn't get fired.
private void hScrollBar1_Move(object sender, System.EventArgs e)
{
MesasgeBox.Show("Scroll bar Moved");
}
When I am moving the scroll bar to left or right the above message box doesn't appear.
Regards,
Subbu
|
|
|
|
|
I think, what you want is event "Scroll", and not "Move".
|
|
|
|
|
Thanks for your reply...
But i don't want to scroll instead I will click the extreme right.
Suppose consider this is the horizontal scroll bar i want to move the contents of the panel by click the extreme right position(as shown in BOLD)
<------------------------------>
How to fire that event?? I tried with scroll it works fine for scrolling the bar and not working at the clicking of extreme right position.
How to acheive this?
Reg,
Subbu
|
|
|
|
|
Any idea Please?
Just click the extreme right end and any events are there. I am using VS.Net 2003. (Bold position)
<-----------------------------> (horizontal scroll bar)
Reg,
Subbu
|
|
|
|
|
Hi,
In the other response it was suggested that you have subscribed to the Move event and the method signature given would support that hypothesis. What you need is the Scroll event.
Alan.
|
|
|
|
|
Cutting right into my host of questions, here is a crackdown of my class:
class TheDocument
{
private TheData[] _list;
public TheDocument(TheData[] list)
{
_list = list;
}
public static void Print(TheData[] list)
{
TheDocument d = new TheDocument(list);
PrintDocument pd = new PrintDocument();
pd.PrintPage += new PrintPageEventHandler(d.PrintPage);
pd.Print();
}
private void PrintPage(object sender, PrintPageEventArgs ev)
{
}
}
Explaining above code, I came to decide that I need no multiple instances of this document-printing class so I made static Print() method which will initialize the instance and does the trick. So from my application I can just call TheDocument.Print(...); and nothing else.
The question is, I couldnt find a way to pass around TheData[] array in other way than either trough constructor or after construction setting it to the instance of an object. This is where all my questions start to roam and I find myself a bit off track; This static method is instance of the calling instance? So within new TheDocument instance I have no access to it without reference?
All the printing stuff is merely serving as an example. My real world solution will inherit from more robust printing class and only contain the code for a specific type of document. I know theres plenty of 3rd party solutions for document designing and using them to print, but I will have host of different types of "simple list" kind of documents to print and decided to take this brute approach.
Coming from VB and C(embedded) programming all this OOP and fancy C# stuff are so overwhelming Feels like I need proper OOP course or something since I dont even know if there is a term to call class with static method which will make instance of the class itself in it. Or if the whole class is static, is there a name for it instead of saying "static class". Another question about OOP I would ask is if I have alot of variables or properties in one object and define new object in it, what is the best way of accessing those variables or properties. Handing out reference to "parent" object kind of makes that approach less encapsulated?
|
|
|
|
|
Your method seems to me that it should not be static, because it wants to use the member data of the class instances. Unless you will have a TheData[] on hand, but no TheDocument class, and just want to print it.
The easiest way to pander to both is to write a method like this
public void Print()
{
TheDocument.Print(this._list);
}
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|