Windows Phone Power Tool (Pre WP-8) Fails To Load Folder Content - windows-phone-7

My environment : Win7, VS2010 Pro, Windows Phone Emulator 10.1.40219.390, HTC T8788, Windows Phone Power Tool v1.6.
I need to Get multiple files (they are <3kb json files) to my dev box from a folder on my emulator/device. I had been happily doing this with Isolated Explorer command tool and/or Windows Phone Power Tool till the number of files was very limited. As soon as the number of files increased in the folder both the tools mentioned above failed to open the folder from device. The application on device and emulator is handling large number of files as expected (tested with 4000+ files). Following are my findings regarding the issue with WPPT (and IS explorer): if a folder contains more than 1024 files, WPPT does not load the folder. The physical size of individual file in the folder does not matter. The issue can be reproduced with same effect on emulator and device. On further investigation I found that WPPT breaks at a call to Microsoft.SmartDevice.Connectivity.RemoteIsolatedStorageFile.GetDirectoryListing() which just says - "Unspecified error" with no details. It seems the said API method is now obsolete and i could not find any substantial information on MSDN about it or the issue
Did somebody else also encounter this problem? Is there some way I can pull large number of files (4000+) to my dev box from IS folder on device/emulator (please note, i can only work with the environment mentioned above, so Win8 or WP8 emulator are out of question)?
Regards.

Related

Prerequisite for Win 10 using vb6 activex documents or webbrowser control

I am trying to install a legacy VB6 app on a Windows 10 Enterprise PC. The app has an install program and it is installed on many Windows server 2016 machines. This program uses active user documents (dob files) that load in a webbrowser control. The install is successful but when I run the program instead of loading the user document in the webbrowser control i get a dialog box asking me if I want to download or save a 'vbd' file with the same name as the active x dll the user document creates.
My question is if anyone knows if there is a prerequisite to having the vb6 webbrowser control or active x documents work on a Windows 10 machine? I have the dll registered and the registry entries match the Windows 2016 server.
Thanks in advance,
Hank
Here's the relevant (I think) part of the VB6 help for ActiveX Documents:
A few of the more common problems in Internet Component Download and their solutions are listed in this section. These include: [...] Prompt: "Opening file DocumentName.VBD. What would you like to do with this file? Open it or save it to disk?
The proposed solution to this is
This error occurs when the Visual Basic runtime library (MSVBVM60.DLL) is not installed. Generally, this occurs when the safety level in Internet Explorer is set to High. To correct this, you must set the safety level in Internet Explorer to Medium or None.
Note sure when this help entry was written, but with the latest IEs, you add the site in question to the Intranet zone and change the setting there. If that actually resolves the problem, you then should try turning security up again by going into "Customized" and add restrictions again that don't cause it to break again.

Visual Studio Administrator mode in Windows 10

Not really sure of my exact question, but here is the situation:
I have an application (WinForms, C# .Net) that I am developing in Visual Studio 2012. It does a lot of things but the important bit is that it needs to read files from a certain location.
In this case, the location of the files is on a server and my machine has a mapped network drive setup for accessing the files. I can manually navigate to the files with Windows Explorer fine.
I have the following line in my code which is highlighting the issue:
System.IO.File.Exists("X:\\A Folder\\a_file.txt");
And that file does exist in that location. However this is where the problem occurs: if I build the solution and run the .exe directly from the "bin" folder (double-click). The code is fine, and it finds the file. But if I run it with visual studio then I get a "file not found" exception.
I am putting this down to the fact that Visual Studio is running in "Administrator" mode (I forget why I needed this, but I do). Now this makes sense if you consider that the "administrator" account does not have the "X:\" drive mapped. However, this has never been a problem until I upgraded to Windows 10 last week.
So my question is:
Does Visual Studio Administrator mode work differently in Windows 10? In this case, does it handle mapped network drives differently?
It's worth noting I upgraded from Windows 7, so I cannot confirm if this issue is also present in 8 and 8.1 or not.
And before anyone asks, let's just say it has to be a mapped drive. No UNC paths allowed!
So I have found a solution/workaround. Kind of seems like a wasted bounty now, so if someone has other suggestions that are better then please post and I will review them and award as applicable. Or even if somebody can make a more detailed version of my solution then I will award that one.
The issue is probably not specific to Visual Studio, but would occur with any application running with elevated privileges. Anyway, the solution I found is to add a registry key that enables the same shared drives to be accessible when running in administrator mode.
The registry key location is:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System
And the key to add is called:
EnableLinkedConnections
And should be created as a DWORD with a value of 1 (0x00000001)
I checked with the machines running Windows 7 and they do NOT have this key, yet they still work fine. So I expect this isn't the only solution, but it does seem to work (no side effects noted yet). I would assume that Windows 10 has a specific setting somewhere that by default prevents mapped drives from automatically being available with "run as administrator".
For reference, I found this information here.
In fact, here is a more "official" recommendation for using this reg key.
This is unlikely to have anything to do with Windows 10, just with the configuration of your machine. What you describe is normal and covered by this KB article. Nothing I can check for myself so just try the recommended workarounds, follow up at superuser.com if necessary.
Different users/system tasks maybe running. As such, you have the X drive mapped, but others do not. You could do the drive mapping on additional users on your Windows installation as well. As you stated, this should not be a Windows 10 only issue, but also Windows 7+ and elevated privileges.
Maybe you could use a configured parameter for the X: path and load at runtime, or even try using UNC paths which will resolve at runtime and not need the drive to be mapped.
\\ServerNameOrIP\A Folder\a_file.txt.
In the code, you would need:
System.IO.File.Exists("\\\\ServerName\\A Folder\\a_file.txt");

Windows App Certification Kit Warning

I have an app that developed for Windows 7 & 8. Developed in VS2010 using C++/CLI. When tried to certify with Windows App Certification Kit, it shows a warning.
Binary analyzer
Warning: The binary analyzer test detected the following errors:
File C:\Program Files (x86)\MyApp\msvcr100.dll has failed the ExecutableImportsCheck check.
File C:\Program Files (x86)\MyApp\msvcp100.dll has failed the ExecutableImportsCheck check.
Impact if not fixed: If the app doesn’t use the available Windows protections, it can increase the vulnerability of the customer's computer to malware.
How to fix: Apply the SAFESEH, DYNAMICBASE, and NXCOMPAT options when you link the app.
How can I avoid this warning from my app.
It makes no sense to use WACK on your project. It was made to verify WinRT apps, the kind that are published through the Store and run on Windows 8.x or Windows Phone. They need to be safe to run in a very restricted sandbox that makes a very small subset of the winapi available. Limited for security, deployment and power-consumption reasons, what WACK verifies. A desktop DLL like msvcr100.dll cannot meet them. Such apps are built with another CRT, vccorlibxxx.dll
You cannot build such an app with VS2010, VS2012 or higher required. Nor can it run on Win7. You simply need to stop using the tool.
Update: it does appear that WACK was updated in the 8.1 SDK to also verify Windows Logo requirements for desktop apps. This is obscure. Judging from the command help that's displayed when I run appcert.exe /? in an elevated command prompt, you must first create an installer for your app. Then you can run appcert with the -apptype desktop and the -setuppath yourinstaller.exe to have it perform the validation. Some additional command line options appear to matter, like -appusage. I don't know what they mean.
Do keep in mind that this is only useful if you need the Windows Logo certification. There ought to be additional information in the logo program documentation about this. Consider contacting Microsoft if you have Windows Logo program questions.

Problems copy files to windows ce from windows 7

I'm having trouble copying binary files to a Windows CE computer from a Windows 7 64bit PC. All I'm using is Window Explorer to connect to the Windows CE computer through ethernet. The file size increases after the copy. I've done this through Windows XP, through the same method (connecting to Windows CE through ethernet, using windows explorer), and the file size doesn't change.
When I open the files in a hex viewer initial portion of the file appear the same then the CE file has a large section of NULL characters the files match again after this followed by another section of NULL characters in the CE file. Then matching again for a while and then a complete jumbled up miss match on both ends.
I have also tried using the command prompt 'copy' command with the biniary option enabled. same issue.
Any ideas of how to copy this over (due to certain restrictions I'm not allowed to install 3rd party software to do the copy)
NEW INFO:
Attempted this with a basic txt file did not get the error inititially (text of file was 'test'). When I increased the size of the text file to 1 MB (text of file was 'testtest\n' over and over) the issue occured.
This bug afaik affects all versions beyond Windows 7 and Windows CE 5.0 (It is not present in Windows Embedded Compact 7). For me this happens for all files with a filesize > 32Kb.
Workaround with zip
You can work around that bug by zipping the files you want to transfer and then unzip them directly to the network share.
Workaround FTP
Another workaround is to stop using SMB and use FTP instead. This will also no longer require you to manually enable NTLM v1.0 on your Windows 7 and up machines.
I know about some authentication issues between CE devices and Windows 7/Vista (and 8, I suppose) PCs.
http://developer.toradex.com/knowledge-base/smb
But I suppose that you should experience issues only during the authentication phase (if the folder is password-protected), not during file transfers.
Are you 100% sure that no CE application is accessing the file while you are transferring it?

How can I run multiple instances of the windows phone 7 emulator at the same time?

I'm creating a multiplayer game for windows phone 7. How can I run multiple instances of the emulator in order to debug it?
You can indeed run multiple instances of the Windows Phone 7 emulator at the same time, and even debug them simultaneously, as I show in my blog post.
Open the folder [Your Drive Letter]:\ProgramData\Microsoft\Phone Tools\CoreCon\10.0\addons
Locate the file ImageConfig.en-US.xsl
Take a copy of it, leaving it in the same directory, and name it something like ImageConfig.en-US 2nd Instance.xsl
Open the copy in a text editor.
Locate the element DEVICE and change it's Name attribute, also assign a new GUID value to ID.
Scroll down the file to locate the part that says PROPERTY ID=”VMID”:
Put a new Guid inside that element – make sure though that you use capital letters rather than lower case.
Save the file
Re open the XAP deployment tool, or Visual Studio, if you already have them open, and you’ll see your new Emulator instances.
See the blog post for more details, and screenshots to clarify some of the steps
You can only run one instance of the Windows Phone 7 emulator at a time on a single machine - that's set by default, and if you don't want to mess with custom configurations. When you deploy from Visual Studio, the same instance is shared between the running instances of the development environment.
However, you can create additional instances of the WP emulator if you follow the instructions in this article. Make sure you backup the config files before editing them.
I had the same problem, trying to test my multiplayer game, and i eventually bought a WP7 device (HTC HD7) on ebay, unlocked it for development purposes, and used it and the emulator for testing.
Since I have experience with the android environment, I can say that denying the possibility of multiple emulator instances really damage the development efforts. Hope Microsoft will change this.
BTW, i'm using the Skiller SDK for the multiplayer and social side of my game (Their official WP7 SDK will be avialable in a few days, and you can download it from http://dev.skiller-games.com). I totally recommend it.
Good Luck.

Resources