I am developing an application using C++ and MFC that shall display an swf file. I use Shockwave Flash Object control found in VS2005, set Movie property to C:\test.swf and it displays the movie fine on my pc. When I move my program to another pc, (first i create a deployment project and create setup, then i install my software on other PC in order to have all required dll files and stuff on second pc) i double click the application and instead of flash movie i see an empty space. When I right click to that space, I see "movie not loaded". Please note that I have c:\test.swf (same file) on the other PC as well.
Why can't I display flash on the other PC?
note: flash player is installed on other pc
Try writing console-logging into your source-code to output some debugging information for you. Compile your project and then place this executable on the other machine.
With the information we have, we can't answer this question appropriately for you, but here is at least a good suggestion.
Related
I am new to Xcode and iOS development and I have a basic question about how to store (bundle) application data that consist of images needed by my application. My application requires a small database of images as input that I supply.
I have an Xcode project in C++ that uses OpenCV that is currently compiled and running correctly on my Mac. The application on my Mac simply reads the image data it needs from a folder on my file system that I can easily point to. I am trying to port this application to iOS using either Objective-C or Swift. I was able to write some basic Objective-C code as a wrapper to my C++/OpenCV application but I am now at the point where I need to access the iOS file system to read the images and I am not sure where to locate that data and how to configure my Xcode project to include it.
After doing some reading on this topic I see that there are several ways to store data in iOS, but I am uncertain about what approach would be appropriate and relatively easy to implement. My understanding is that all the data for my app needs to live in the application sandbox. I see plenty of examples for how to get the file path for various folders in the sandbox, but it is not clear to me how to actually configure my project to include the data (i.e., where do I put my images?). Is there something I need to configure within my Xcode project so that when I compile the application it knows about my data?
I found many posting about the iOS file system, Core data, archiving data, etc… but had a hard time locating any information about how to actually configure my project with data that I supply. Any help would be greatly appreciated.
Thank you!
If the images that you are supplying are fixed in the app (ie- not changing over time) then you simply add the images to the app itself. They are stored in the app bundle and can be accessed as follows (with sample names);
let imagePath = NSBundle.mainBundle().pathForResource("myImage", ofType:"jpg")
let splashImageURL = NSURL.fileURLWithPath(imagePath!)
anImage = NSImage(contentsOfURL:splashImageURL)
You can create a folder in the project to hold the images. This is not used in the final image path, only for convenience in the project. You can use the File menu or drag and drop image files directly into the project. Make sure to check the 'copy files' option to move the images from your source location into the project itself.
OK, first I shall point that I am completely new to Windows Apps Development, which is good, since I am trying to develop a Windows Store App for PC to use a PrimeSense Scanner connected via USB. I have asked a more specific question about this here.
This time I have a more generic question, which is more related to Windows Store app development. I am using VS2013 Express and compiling for Win32.
When I compile my application for VS2012 and run it as an execcutable file, I can connect to the scanner perfectly. But I can't do the same with VS2013 and running it as a Store app.
I know the device is connected and the drivers are updated and all dlls file placed in the Widnows System 32 directory.
I have also added all Capabilities to the App Manifest and also added the following Device Capability
<m2:DeviceCapability Name="usb">
<!--OSRFX2 Device-->
<m2:Device Id="vidpid:1d27 0609">
<m2:Function Type="classId:ff * *" />
<m2:Function Type="name:vendorSpecific" />
</m2:Device>
</m2:DeviceCapability>
The vid and pid, obviously match the corresponding codes of the device.
One of the errors I recieve when trying to conenct to the scanner using OpenNI is:
Could not open to "\\?\usb#vid_1d27&pid_0609&mi_00#7&1601586a&0&0000#{c3b5f022-5a42-1980-1909-ea72095601b1}" USB Device not found
This error is quite frustrating since I know the device is connected. So I tend to think that there is some level os specificity on the Windows Store App side of the game that is not enabling my to connect to the device. As I said, I am compiling for Win32.
Is there a chance that the drivers will not work for a Windows Store App. Is there some extra stuff I should do inside the Windows Store App logic that I am not doing and that is necessary to connect the USB device? I am sorry, but I am completely new to Windows Store App development.
Thank you.
You can't do that from metro apps.
You typically create a handle to that usb device by calling CreateFile with that object mananger path as the file to 'create'. CreateFile is not allowed in metro apps - "desktop apps only" - and its 'replacement', CreateFile2, specifically doesn't allow opening object manager objects.
Furthermore, the documentation for CreateFile2 states that in metro apps this function can only open files and directories (and not things like pipes, mailslots, consoles, etc.).
See also this post on social.msdn
Unless I missed something, I don't think this is possible.
When I connect the iPod (or iPhone) to the Windows PC,
it look like an USB drive, but I can't open a file on it because I can't know the correct file path.
I was also unable to drop the file to my application because the drag source does not have CF_HDROP.
Some applications can open a file on iPod, but it was a copy on the local temp folder.
screenshot http://img862.imageshack.us/img862/5396/ipodx.png
My question is ..
How can I directly (programmatically) open and read the picture file on iPod?
If I double click on it (or right click and select Preview menu),
it launches Windows Photo Viewer -- it is not my default picture viewer.
Can I change the file (.PNG) association to other application?
What's the viewer application's requirement to be a default viewer for files on ipod?
Applications that do that use Picture Transfer Protocol (PTP). On Windows Microsoft implements many interfaces as part of Windows Image Acquisition (WIA). Read more here: http://msdn.microsoft.com/en-us/library/ms630344(v=VS.85).aspx
http://support.microsoft.com/kb/307859 or manually edit registry at HKEY_CLASSES_ROOT\.png
Try the iPhoneBrowser program. It should give you a fair idea of the path.
From everything I've read I don't think Apple gives you access to the file system on the iPhone / iTouch / iPad; they want you to use iTunes to transfer files back and forth. I believe the Android and Windows Phone environments have similar restrictions. (If you "jailbreak" or "root" your device that's obviously a different story, which is why many such utilities explicitly state they only work on rooted devices.)
In part, this is a security precaution: if it were possible to directly access the file system on the mobile device it would be that much easier for someone to plant malware on your phone or PDA.
For this reason, updates to the various mobile OSes frequently include changes to (1) make jailbreaking more difficult and/or (2) close the loopholes that allow software like the iPhoneBrowser to work.
Some of the portable music players that use (Windows) Media Player have similar limitations. For example, I had a Sansa m100 (I think) where I could just drag files to the device and the playlist would automatically get updated; on at least some of the newer models (eg the c200) you have to use Media Player to download content. Which to me is annoying since there doesn't seem to be a way to use Media Player to delete content from the device.
There probably are APIs to do this sort of thing, but I would guess they're somewhat specific to the platform you're using -- ie I don't think you're going to be able to just use CreateFile() or something like that.
I am beginner in an silverlight application. So at first i looked on demo application which is provided by wince 6.0 r3 at location
WINCE600\PUBLIC\COMMON\OAK\DEMOS\XAMLPERF - this contains c++ code
and
WINCE600\PUBLIC\COMMON\OAK\FILES\XAMLPERF - this contains xaml file with the images
Now before running this application in an emulator. I at first proceeded with the following:
I have first taken my workspace went to catalog item and added "Silverlight for Windows Embedded"
from the drop down menu of an catalog item
Then right clicked on solution explorer and choosed on properties and under configuration in drop down menu i have selected environment variables where i have added new variable called "sysgen_samplexamlperf" and assigned value as 1 for that variable.
Now after rebuiding the application, i have dumped the image into emulator and i found that at desktop of device emulator i can see the exe file to which i run and i can see the application is working fine with 3d effects.
Now same thing i proceeded in iMX31 hardware and i was not able to see the application running in a proper manner as it was performing in an emulator. So now what i feel is that there be any dependency when we run the application on hardware.
So what can be the dependency? Also in this location "WINCE600\PUBLIC\COMMON\OAK\FILES\XAMLPERF" the images are in png format. So is there any dependency with an image format?
Thanks and regards
Silverlight for Embedded devices does not require HW support. You can add hardware support to enhance performance, but it is not a requirement.
On my PXA3XX platform for example, Silverlight runs without any HW tweaks through the driver.
What is your question exactly? Where is the demo application?
You can just as well add the XAML based internet explorer to make sure it Silverlight runs. Be aware that the XAML based IE does not have a shortcut on the desktop so you need to create one by yourself or just run the executable from \Windows
I need help trying to get thermal shipping label data from a Web site to a local Zebra printer. The data itself is just plain text but spooling it from a Web site seems to be very difficult for some reason. Does anyone have any experience with this? I am using ColdFusion 8 and Windows Server 2008.
Your print data could be sent with a MIME type (there probably is one for it, but you could make one up too)
On the client's PC, they could have that MIME type mapped to a program that simply prints whatever it receives.
Setting the MIME type on a PC can be done with code or a .REG file. If you control the user's environment, that's pretty simple. Making a program that dumps whatever it receives is also easy. That would be a nice task for Visual C or good, old VB6. Very little code. As long as the user has the .EXE and the .REG file, they'll print reliably, every time, without the browser's crap getting in the way. (think of this as what happens when you click a link to a PDF - Acrobat opens. Well, have the little printing EXE open for your file type - easy).
This is familiar to me... I think I did this with a proprietary font set... AH! Yes, I had to do this to generate mortgage documents that used proprietary fonts for drawing the pretty lines. I was able to take a proprietary, stand-alone mortgage origination server, share the folder where the mortgage .PRN files had been created. A Web server with access to that share enumerate the files in the share to a Web page, then, when users clicked on a file, the .PRN would stream to their PCs where a corresponding .EXE would see it as one of its own and send it to the correct output device (a designated printer at their location). That dumb little piece of code eliminated 126 document servers (and their maintenance and licensing costs) instantly and mortgage documents were never lost or sent to the wrong branch by mistake again. I think it took 3 hours to get it all working from inception to testing at the branches.
Yeah, same thing here. It'll work. Trust me. It'll work.
I was unclear by your question as if the Zebra printer is connected to the web server and what software the server is running. If you are trying to send the data to a printer connected to the web server, I used the following information to send label data to a Zebra thermal printer in an Intranet solution and it worked great:
How to send raw data to a printer by using Visual C# .NET
Perhaps you can adapt this solution to your environment.
I fiddled about with this problem for ages. In the end I had to create downloadable printfiles. The user downloads them and then copy (MSDOS) them to the printer.
There were two main issues:
generally speaking, you can't print
from a website unless you open the
file (ie the file becomes local)
the print drivers on the user's (Windows)
machine add non-printing characters
to the barcode file as it is sent to
the printer
We installed a batch file (which runs copy instead of print) on all client machines that need to print barcodes and we added a right-click menu item to run the batch on files named *.barcode.
I'll be watching this thread to see if anyone has found a more direct solution. But this was the only thing we could do given the parameters of our situation.
I don't know if I have fully understood your problem or the exact environment but I have answered a similar question here with an example for ASP.NET (C#). That solution is mainly for a known printer (specific IP and port). If you have several clients with their own label printers the solution could be used for that as well. But then you have to make a solution where the clients are able to set their own IP and port of their label printer. They also might need to make a port forward for the traffic in their firewall. The webpage then just prints to the specified IP and port. You can also use a domain name instead of IP.
Perhaps you could try this:
http://code.google.com/p/jzebra/
This project allows the ZPL commands to be sent to the printer via a web browser.