Contact.GetPicture Null value

ddahan

Member
Licensed User
Longtime User
Hi,
I'm using Contact.GetPicture to get Outlook contact's picture. a null value is returned if there is no contact picture.
The issue is that Null value causes a 'NullReferenceException' error when creating a BitmapEx object with Contact.GetPicture null value result .
I cannot find a way to identify a Contact.GetPicture null value to prevent the error.

I'll appreciate your advice.

Thanks,
David.
 

mjcoon

Well-Known Member
Licensed User
I cannot find a way to identify a Contact.GetPicture null value to prevent the error.

Are you asserting that IsNull(Contact.GetPicture), per Help>Keywords>General, does not do what you want?

Does it fail to return True for your case?

Mike.
 

ddahan

Member
Licensed User
Longtime User
Hi Mike,
Thanks for your great help.
I missed the IsNull function :sign0013: ... now it is working great.

Regards,
David.
 

mjcoon

Well-Known Member
Licensed User
Thanks for acknowledgement. Looking back, my reply strikes me as being snotty in tone; sorry for that! Maybe I thought that someone dealing with contacts would have sorted the sometimes obscure help structure.

BTW in case it might help with future look-up, you could have found IsNull by searching for "null" in the interfaces page Basic4ppc - Windows Mobile programming and Pocket PC Development.

Mike.
 

ddahan

Member
Licensed User
Longtime User
Hi Mike,
Not a problem. You are right, I was suppose to be ware of the IsNull function.

I'm doing a huge project that really push the limits of Basic4PPC. I'm using almost all the libraries, I used IsNull function in two other modules and still missed it! Probably I was too tired ...

Hey, you have to feel good - you helped me to go out of my issue.

Regards,
David.
 
Top