I use the following method to request lockscreen access in WinRT: public async void RequestLockScreenAccess() { var status = BackgroundExecutionManager.GetAccessStatus(); if (status == BackgroundAccessStatus.Unspecified || status == BackgroundAccessStatus.Denied) status = await BackgroundExecutionManager.RequestAccessAsync(); switch (status) { case BackgroundAccessStatus.AllowedWithAlwaysOnRealTimeConnectivity: _mainInfo.NotifyUser = "This app is on the lock screen and has access to [...] read more
I'm using Microsoft's CSExeCOMServer as a base for setting up a Out-of-process COM server, but it's not working properly. The server is 64 bit, and the client is 32 bit. Here's the sample interface [Guid(XXCryptService.InterfaceId), ComVisible(true)/*, InterfaceType(ComInterfaceType.InterfaceIsIUnknown)*/] public interface IXXCryptService { [DispId(1)] string Encrypt(string password, string key); [DispId(2)] string Decrypt(string [...] read more
I am working on a application which needs to communicate via COM interface with multiple CAD applications (not in the same time). I want to have nice and reusable code, but I came across problems with type casting of COM objects when I made generic application handle getter method. What [...] read more
Consider this registered type library in a DLL: [uuid(…), version(1.0)] library structLib { importlib("stdole2.tlb"); [uuid(…)] typedef struct MyStruct { BSTR m_sStr; } MyStruct; }; In vb6 I can reference this type library and use the UDT / struct in a compiled exe (simple form with a button), named a.exe: Private [...] read more
I've been working on scripting some repetitive behaviors in Solidworks using python. I spent a while trying to go through the win32com library and managed to get a lot to work, but ran into a roadblock. So I'm now trying to control the API via Iron Python. Just trying to [...] read more
I am trying to use old VB6-made DLLs in a VS2017 solution, but one of them started to fail last week. I have registered them (regsvr32), added the references in the solution, and tried using the methods inside them. Everything was going OK when I closed my VS2017 for lunch [...] read more
We are doing Windows based automation software that uses the Skype lync SDK library. Using Microsoft.Lync.Model I am trying to send a message to another Skype for Business user from a C# application with below given code: LyncClient lyncClient = LyncClient.GetClient(); Conversation conversation = lyncClient.ConversationManager.AddConversation(); But it gives following error [...] read more
I'm currently recreating my Image Explorer application, formerly written in Windows Forms to the Windows Presentation Framework. My WinForms application was using the WindowsThumbnailProvider from @DanielPeñalba (See this link for the original version of the code) WinForms Version - Successfully converting 0 alpha, 0 red, 0 green and 0 blue [...] read more
I'm using the "Microsoft.Office.Interop" library to create an excel file. Have office 365 and imported this dll to my vb proyect: "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office12\Microsoft.Office.Interop.Excel.dll" So, i had this error: > Cannot convert COM object from type > 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type > 'Microsoft.Office.Interop.Excel._Application'. [...] read more
hi I have one doubt in ssis how to avoid Unable to cast COM object of type error using SSIS ODBC Connection to PostgreSQL I want load data from postgres to sql server using ssis package . In ssis solution I have 50 plus dft for loading data from postgres [...] read more
I am using VS2017. I have an app written in VB that has been running fine for months. This morning it would not run. I tried to recompile and got the following warnings. Severity Code Description Project File Line Suppression State Warning Could not determine the dependencies of the COM [...] read more
Is there a PIA for Office365 and Visual Studio 2010? If so how do I get it? If not then what is the equivalent? There are no PIAs on my PC for Office365 or anything beyond Office 14. Context: I am migrating all my files/Folders from an old PC to [...] read more
I have some VBA code that refreshes//saves//closes my Excel reports in the morning. Unfortunately, some of the reports are throwing an "unexpected error" which interrupts the script. enter image description here [https://i.stack.imgur.com/b0euE.png] If I simply "x" out of the Unexpected Error message, the script continues to run smoothly. MY QUESTION: [...] read more
I want add a text watermark in word. I use Microsoft.Office.Interop.Word 15. The same code works for office 2016 32-bit, but for office 365 64-bit, will throw the exception 'Element not found' 0x8002802B when I call ".AddTextEffect". How can I fix this problem? wordDoc = wordApp.Documents.Open(file.FullName) wordApp.Visible = True 'Create [...] read more
USING: * x64 * Windows server 2012 * SQL 2014 Enterprise Installation * Visual Studio 2012 * SSDT for VS 2013 When I open a precreated package with same connection in SSDT for VS 2013 on same machine, I can open the connection and connect to the VFP source and [...] read more
Good afternoon all, I am currently working on an integrated testing portal using MVC.Net. I am attempting to migrate a VB custom communication script to a C# service. I have successfully migrated a number of newer QTP scripts, however have got stuck on a couple of legacy scripts that the [...] read more