Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Init Caps | Excel Worksheet Functions | |||
Conditional format to highlight only cells with formula, not const | Excel Worksheet Functions | |||
option to add asterisk indicating statistical signficance in char. | Charts and Charting in Excel | |||
8500 cells with phone number(7 char.), wishing to add area code (10 char.) | Excel Discussion (Misc queries) | |||
XLL - VS .Net2003 - init problem - const char strings - /Gf option?? | Excel Programming |