[VC++][ActiveX]LPDISPATCH instanciation d'objet
Bonjour,
J'ai inséré un ActiveX dans mes ressource et j'ai un crash de l'application...
voici le code simplifié:
Code:
1 2 3 4 5 6 7 8 9 10
|
long success = m_RSSTortuga.DownloadRss("http://news.google.com/news?ned=us&topic=h&output=rss");
if (success == 0) exit(1);
CRss1 *channel, *item;
// How many RSS news items?
channel = (CRss1*)m_RSSTortuga.GetChannel(0);
int numItems = channel->get_NumItems(); -> ici !!!!!!! |
alors que le code en C# doit fonctionner....
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Tortuga.Rss rss = new Tortuga.Rss();
// Download Google Headline News
bool success = rss.DownloadRss("http://news.google.com/news?ned=us&topic=h&output=rss");
if (!success)
{
return;
}
// Get the channel.
Tortuga.Rss channel = rss.GetChannel(0);
// How many items?
int numItems = channel.NumItems;
// Add the title of each item to a list box.
int i;
for (i=0; i<numItems; i++)
{
Tortuga.Rss item = channel.GetItem(i);
listBox1.Items.Add(item.GetString("title"));
} |
Comment instancier correctement "channel".... je ne sais pas :(
Merci pour votre aide....