Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 7th, 2003, 01:58 AM
Registered User
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with ASP.NET and SysAllocString

    I have developed an ATL COM component which is called from ASP.NET.The COM defines a function as below.pVal is the return value.

STDMETHODIMP COperations::get_SearchEntry(int opCode, BSTR inValues, BSTR *pVal)
//some operations

WCHAR *temp;
temp = function1();

//print temp to file ------Point 1
*pVal = SysAllocString(temp);
//print *pVal to file ------Point 2
return S_OK;

    I am encountering a problem in this COM when i call this function in ASP.NET.When i look at the error log file which i generate Point1 has been reached but point 2 has not been reached.This problem does not occur always but after 6-7 times(random) but once it occurs it is consistent.

    Is it a problem with SysAllocString.?

    Thanks in advance for the help

Dheeraj Bhat

Dont Follow me,I am Lost Too
Old July 7th, 2003, 09:12 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma

Hi Dheeraj

Please post the code of function1() to this forum.
I will see what I can do for you.

Ankur Verma
.Net and C++ Specialist
Wiley Tech Support

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom HTTP 404 Problem w/ASP to ASP.NET kwilliams ASP.NET 2.0 Professional 7 November 26th, 2007 04:17 PM
Problem Converting C# to VB.NET in ASP.NET kwilliams ASP.NET 2.0 Basics 0 February 9th, 2007 06:22 PM
Problem with Exercise in Beg. asp.net for VB.net! mrfella71 BOOK: Beginning ASP.NET 1.0 1 October 23rd, 2005 12:06 PM
ASP.NET problem btls ASP.NET 1.0 and 1.1 Basics 1 July 19th, 2004 08:33 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.