草庐IT

DocumentProperties

全部标签

c++ - windows C++ opening printer with documentproperties get C6836 "Write Overrun"代码分析警告

在下面的代码中://IfGetPrinterdidn'tfillintheDEVMODE,trytogetitbycalling//DocumentProperties...if(pi2->pDevMode==NULL){dwNeeded=DocumentProperties(NULL,hPrinter,printerName,NULL,NULL,0);if(dwNeededpDevMode=pDevMode;}在线lFlag=DocumentProperties(NULL,hPrinter,printerName,pDevMode,NULL,DM_OUT_BUFFER);当我运行Vi

c# - 以编程方式访问 Excel 自定义文档属性

我正在尝试将自定义属性添加到我以编程方式创建的工作簿中。我有一个获取和设置属性的方法,但问题是工作簿为CustomDocumentProperties属性返回null。我不知道如何初始化此属性,以便我可以在工作簿中添加和检索属性。Microsoft.Office.Core.DocumentProperties是一个接口(interface),所以我不能去执行以下操作if(workbook.CustomDocumentProperties==null)workbook.CustomDocumentProperties=newDocumentProperties;这是我必须获取和设置属性的