Click here to Skip to main content
15,885,309 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionProblems serializing a subclass of an ArrayList Pin
Skip.za13-Nov-05 3:07
Skip.za13-Nov-05 3:07 
QuestionProfile Switching? Pin
Eustov12-Nov-05 9:12
Eustov12-Nov-05 9:12 
QuestionSystem.Net.Sockets for reading IP packets? Pin
Tom Paluzzi11-Nov-05 4:47
Tom Paluzzi11-Nov-05 4:47 
AnswerRe: System.Net.Sockets for reading IP packets? Pin
S. Senthil Kumar13-Nov-05 19:03
S. Senthil Kumar13-Nov-05 19:03 
Questionforms.timer vs thread.timer Pin
David Menéndez Cisterna10-Nov-05 6:26
David Menéndez Cisterna10-Nov-05 6:26 
AnswerRe: forms.timer vs thread.timer Pin
S. Senthil Kumar10-Nov-05 19:04
S. Senthil Kumar10-Nov-05 19:04 
GeneralRe: forms.timer vs thread.timer Pin
David Menéndez Cisterna11-Nov-05 2:01
David Menéndez Cisterna11-Nov-05 2:01 
QuestionRetrieving Public Contacts from Outlook Pin
chrisrm9-Nov-05 20:29
chrisrm9-Nov-05 20:29 
I am writing a managed C++ app that must retrieve all shared public contacts from outlook. I have a list of 484 contacts - but my code retrieves always exactly 250 of them and then exceptions start occurring when converting the enumerated MAPIFolder items into ContactClass's in order to print out the details of the contacts.

Here is some of my code :

<code>
//----------------------------------
// Get Contacts
Outlook::NameSpaceClass* outlookNS = dynamic_cast<Outlook::NameSpaceClass*>(outLookApp->GetNamespace("MAPI"));


Outlook::MAPIFolder* publicFolder = outlookNS->GetDefaultFolder(Outlook::OlDefaultFolders::olPublicFoldersAllPublicFolders);

//Print out some basic info.
String* s = String::Format("You have access to {0} public Outlook folders.", __box(publicFolder->Folders->Count));
Log(s);

IEnumerator* en = publicFolder->Folders->GetEnumerator();

while(en->MoveNext())
{
Outlook::MAPIFolder* item = dynamic_cast<Outlook::MAPIFolder*>(en->Current);
if (item)
{
String* st = String::Format("-> Public Folder: {0}", item->Name);
Log(st);

if (item->Name->Equals("My Shared Contacts"))
{
//Print out contact info.
String* s = String::Format("You have access to {0} public contacts.", __box(item->Items->Count));
Log(s);

IEnumerator* i = item->Items->GetEnumerator();
int count = 0;
while (i->MoveNext())
{
if (i->Current)
{
try
{
if (count == 248)
{
Log("BANG! - from now on exceptions occur when performing conversion below");
}
Outlook::ContactItemClass* contact = dynamic_cast<Outlook::ContactItemClass*>(i->Current);
if (contact)
{
Log(String::Format("Item {0}",__box(count)));
Log(contact->ToString());
Log(contact->FileAs);

//Log(contact->LastName);
//Log(contact->Email1Address);
Log("--------------------------------");
}
}
catch(InvalidCastException* e)
{
//I end up here from item 250 onwards. why does this happen?
Log(e->Message);
}
}
count++;
}
break;
}
}
}
</code>
QuestionUrgent help needed Pin
NityaKakkar9-Nov-05 19:14
NityaKakkar9-Nov-05 19:14 
AnswerRe: Urgent help needed Pin
S. Senthil Kumar13-Nov-05 19:06
S. Senthil Kumar13-Nov-05 19:06 
QuestionHELP!!!!!!!- How to decompile .DLL file to get source code back? Pin
vicky4579-Nov-05 14:28
vicky4579-Nov-05 14:28 
AnswerRe: HELP!!!!!!!- How to decompile .DLL file to get source code back? Pin
Saksida Bojan9-Nov-05 20:46
Saksida Bojan9-Nov-05 20:46 
GeneralRe: HELP!!!!!!!- How to decompile .DLL file to get source code back? Pin
vicky45710-Nov-05 9:05
vicky45710-Nov-05 9:05 
AnswerRe: HELP!!!!!!!- How to decompile .DLL file to get source code back? Pin
lmoelleb10-Nov-05 1:44
lmoelleb10-Nov-05 1:44 
Questioncustomize shortcut during installation Pin
kani989-Nov-05 12:02
kani989-Nov-05 12:02 
AnswerRe: customize shortcut during installation Pin
rwestgraham9-Nov-05 14:49
rwestgraham9-Nov-05 14:49 
Question.NET 2.0?? Pin
HahnTech9-Nov-05 7:41
HahnTech9-Nov-05 7:41 
AnswerRe: .NET 2.0?? Pin
HahnTech9-Nov-05 10:23
HahnTech9-Nov-05 10:23 
GeneralRe: .NET 2.0?? Pin
HahnTech14-Nov-05 5:51
HahnTech14-Nov-05 5:51 
GeneralRe: .NET 2.0?? Pin
Dave Kreskowiak15-Nov-05 8:08
mveDave Kreskowiak15-Nov-05 8:08 
GeneralRe: .NET 2.0?? Pin
HahnTech15-Nov-05 10:53
HahnTech15-Nov-05 10:53 
GeneralRe: .NET 2.0?? Pin
ricardojb14-Nov-05 16:59
ricardojb14-Nov-05 16:59 
AnswerRe: .NET 2.0?? Pin
bneacetp9-Nov-05 13:13
bneacetp9-Nov-05 13:13 
AnswerRe: .NET 2.0?? Pin
Dave Kreskowiak10-Nov-05 6:21
mveDave Kreskowiak10-Nov-05 6:21 
AnswerRe: .NET 2.0?? Pin
ricardojb14-Nov-05 16:49
ricardojb14-Nov-05 16:49 

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.