Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default XLL - VS .Net2003 - init problem - const char strings - /Gf option??


Huge thanks to Rob Bovey - Excel Guru!!
You saved me many hours of pain with your lucent
explanation of how writing to string literals is
no longer supported in VS .Net.
Too bad the MSDN documentation for making XLLs hasnt been
updated to reflect this behavior change.

To anybody who used the examples in the Excel SDK,
please note, this code will no longer work.

static char* xll_name_buf = " my excel string.";
xInfo.xltype = xltypeStr;
xInfo.val.str = xll_name_buf;
xInfo.val.str[0] = lstrlen(&xll_name_buf[1]);

similarly,

Excel(xlcAlert, 0, 2, TempStr(" ERROR: Bad reset hols."),
TempInt(2) );

###############################################

The solution seems to be putting the character string
on the stack. Be careful though - you cant use
very much stack space in excel, otherwise you will
get mysterious crashes......

Kevin
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Init Caps msnyc07 Excel Worksheet Functions 3 December 27th 09 09:19 PM
Conditional format to highlight only cells with formula, not const hkbarnett Excel Worksheet Functions 2 November 19th 09 01:49 AM
option to add asterisk indicating statistical signficance in char. [email protected] Charts and Charting in Excel 1 May 19th 06 01:24 PM
8500 cells with phone number(7 char.), wishing to add area code (10 char.) [email protected] Excel Discussion (Misc queries) 6 March 10th 06 05:13 PM
XLL - VS .Net2003 - init problem - const char strings - /Gf option?? Rob Bovey Excel Programming 1 July 27th 03 10:41 PM


All times are GMT +1. The time now is 07:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"